Jump to content

drilonb

Members
  • Posts

    99
  • Joined

  • Last visited

Everything posted by drilonb

  1. I am using this code from Ryan <?php // other languages that we support in addition to English $languages = array('es', 'fr'); // check if the current page's URL ends with a language if(in_array($input->urlSegment1, $languages)) { // A known language was specified in the URL, so save it in our session. // Now that language will be the default even if URL doesn't have a language specified. $session->language = $input->urlSegment1; } if($session->language) { // Get the body field for our custom language $body = $page->get("body_" . $session->language); } else { // get the body field for our default language (English) $body = $page->body_en; } // Output the body text echo "<div id='bodycopy'>$body</div>"; this work perfect only the problem is to make change in title field in menu, others fields work nice and translate nice
  2. drilonb

    Lukio.fi

    Lovely i really like it, great work
  3. Thanks Ryan for your replay now i am using 2 of them start and end and everything is working now, Br,
  4. Thanks ADAMKISS i try it now its work perfect i will play now with post in template,
  5. Hello i like to know is possible to skip post in category if i am using like this , <?php foreach($page->children("sort=-created, limit=1") as $child) { $image = $child->images->first(); $thumb = $image->size(80, 60); $summary = substr($child->body, 0, 95); $titulli = substr($child->title, 0, 31); echo " <a href='{$child->url}'><img src='{$thumb->url}' width='{$thumb->width}' height='{$thumb->height}' alt='Fros Group' /></a> <a href='{$child->url}'>$titulli</a> <p class='bardh'>Postuar me:{$child->datapost}</p> <p>$summary</p> "; } and i like to skip first 3 post and to show 4,5,6 etc... thanks.
  6. Thanks Arkster , for now i am using like this i am Truncate-d and title too and its working perfect in template, example gjelbert.co <?php foreach($page->children("sort=-created, limit=4") as $child) { $image = $child->images->first(); $thumb = $image->size(100, 70); $summary = substr($child->body, 0, 80); $titulli = substr($child->title, 0, 19); echo " <ul class='latestnews'> <li> <a href='{$child->url}'><img src='{$thumb->url}' width='{$thumb->width}' height='{$thumb->height}' alt='Sport Kosova' /></a> <p><a href='{$child->url}'>$titulli</a></p> <br>$summary</br> </li> </ul> "; }
  7. drilonb

    Sport Portal

    @adamkiss i know for colors and this is just site content workflow when i finish it i will put in real domain name sportkosova.com we have to many requests from owner for color but in the end they will chose final color to put in site, and i am waiting for final, Thanks for post,
  8. drilonb

    Sport Portal

    Thanks Ryan i make some changes in categories to look more effective and to found more news for each profile, With ProcessWire make everything, fast and lovely.
  9. drilonb

    Sport Portal

    I am creating a Portal for sport i am still working on it all with ProcessWire just comments are with FB, http://www.gjelbert.co/
  10. Hey thanks Ryan i read step by step and now i fix it its work perfect , i use like this code, <?php $children = $pages->get("/f1/")->children("sort=-created, limit=3"); foreach($children as $f1) { $image = $f1->images->first(); $thumb = $image->size(185, 130); $summary = substr($f1->body, 0, 120); echo " <li><a href='{$f1->url}'><img src='{$thumb->url}' alt='Sport Kosova' /></a> <p class='bardh'>$summary</p> <p class='readmore'><a href='{$f1->url}'>Vazhdo Leximin »</a></p> </li> "; }
  11. Ryan can you help with this body copy in my template i am using like this, <?php $children = $pages->get("/futboll/")->children("sort=-created, limit=3"); foreach($children as $futboll) { $image = $futboll->images->first(); $thumb = $image->size(100, 100); echo " <ul class='latestnews'> <li><img src='{$thumb->url}' alt='Sport Kosova' /> <p><strong><a href='{$futboll->url}'>{$futboll->title}</a></strong></p><p class='bardh'></br>{$futboll->summary}</p> </li> </ul> "; } ?> and i like to limit body text in blog i try some your recommendation like: if($skyscraper->body) { $summary = strip_tags($skyscraper->body); if(strlen($summary) > 500) { $summary = substr($summary, 0, 500); // display no more than 500 chars $summary = substr($summary, 0, strrpos($summary, ". ")+1); // and truncate to last sentence } $summary = trim($summary); } else $summary = ''; $out = "\n\t<tr class='skyscraper_details'>" . "\n\t\t<td rowspan='2' class='skyscraper_image'><a href='{$skyscraper->url}'>$img</a></td>" . "\n\t\t<td><a href='{$skyscraper->url}'>{$skyscraper->title}</a></td>"; But i am gating blank in body or summary fields,
  12. This is amazing , great and biggest thanks Ryan for all support,
  13. It's possible to make Siblings with limit, sort, i make like this works perfect but show older in top <?php echo "<ul class='menuposht'>"; foreach($page->siblings as $sibling) { $class = $page === $sibling ? " class='active'" : ''; echo "<li><a$class href='{$sibling->url}'>{$sibling->title}</a></li>"; } echo "</ul>"; for now i am using like this to sort them and limit, works nice, but i like to use sibling <?php $children = $pages->get("/puna/")->children("sort=-created, limit=3"); foreach($children as $puna) { $class = $page === $puna ? " class='active'" : ''; echo " <ul class='menuposht'> <li><a$class href='{$puna->url}'>{$puna->title}</a></li> </ul> "; } Thanks.
  14. simple http://gjelbert.com/album-list/ shows gallery in pop up with fancybox thanks to Ryan.
  15. Thanks Ryan , i have in target and 3 sites for this month i really like to work with PW, every day i lesson new features to use for sites.
  16. Here is a new work with processwire , http://www.baristafinchley.co.uk/
  17. @JBROUSSIA i will change it when i go at home and i don't like it but u know when u have any client with to much requests and changes u need to close eyes and work just to finish it lol. thanks for replay,
  18. yes of course this is a code with table sort latest product in home sales shows 5 for each page, <?php $children = $pages->get("/shtepi/shtepi-ne-shitje/")->children("sort=-created, images>0, limit=5"); foreach($children as $prishtina) { $image = $prishtina->images->first(); $thumb = $image->size(190, 98); echo " <tr class='color1' onmouseout='style.backgroundColor='#F3F5F6'' onclick='document.location.href='#.html'' onmouseover='this.style.cursor='pointer'; style.backgroundColor='#ffffff'' title='Vezi detaliile anuntului' > <td><a href='{$prishtina->url}'><img src='{$thumb->url}' class='img_left' alt='' title='' border='0'/></a></td> <td><a href='{$prishtina->url}'>{$prishtina->qmimi} $ </td> <td><a href='{$prishtina->url}'>{$prishtina->qyteti}</td> <td><a href='{$prishtina->url}'>{$prishtina->prodhimi}</td> </tr> "; }; And this is code in my template, works perfect <div class="column4"> <div class="title" style="float:left;"> <div style="float:left;">Shtepi ne shitje</div> </div> <table style="clear:both; width:695px; margin-top:10px;" cellpadding="0" cellspacing="0" border="0"> <tr> <th><center>Foto</center></th> <th>Qmimi</th> <th>Vendi</th> <th>Viti i prodhimit</th> </tr> <?php $children = $pages->get("/shtepi/shtepi-ne-shitje/")->children("sort=-created, images>0, limit=5"); foreach($children as $prishtina) { $image = $prishtina->images->first(); $thumb = $image->size(190, 98); echo " <tr class='color1' onmouseout='style.backgroundColor='#F3F5F6'' onclick='document.location.href='#.html'' onmouseover='this.style.cursor='pointer'; style.backgroundColor='#ffffff'' title='Vezi detaliile anuntului' > <td><a href='{$prishtina->url}'><img src='{$thumb->url}' class='img_left' alt='' title='' border='0'/></a></td> <td><a href='{$prishtina->url}'>{$prishtina->qmimi} $ </td> <td><a href='{$prishtina->url}'>{$prishtina->qyteti}</td> <td><a href='{$prishtina->url}'>{$prishtina->prodhimi}</td> </tr> "; }; ?> </table> <div class="pagination"> <?php $results = $pages->find("parent=/shtepi/shtepi-ne-shitje/, limit=5, sort=title"); echo $results->renderPager(); ?> </div> </div><!-- end of Home Sales Table list four -->
  19. Thanks Ryan, colors i don't like but they are choice of client :S
  20. You are GREAT i use this <?php $results = $pages->find("parent=/shtepi/shtepi-ne-shitje/, limit=5, sort=title"); echo $results->renderPager(); here if some one like to have a Simple CSS for Pagination div class="pagination"> <?php $results = $pages->find("parent=/shtepi/shtepi-ne-shitje/, limit=5, sort=title"); echo $results->renderPager(); ?> </div> CSS /*---------------------pagination-----------------------------*/ div.pagination { padding:5px; margin:5px; text-align:center; float:left; font-size:10px; } div.pagination a { padding: 2px 5px 2px 5px; margin-right: 2px; border: 1px solid #ddd; text-decoration: none; color: #d8325d; } div.pagination a:hover, div.pagination a:active { border:1px solid #ddd; color: #fff; background-color: #d8325d; } div.pagination span.current { padding: 2px 5px 2px 5px; margin-right: 2px; border: 1px solid #ddd; font-weight: bold; background-color: #d8325d; color: #FFF; } div.pagination span.disabled { padding: 2px 5px 2px 5px; margin-right: 2px; border: 1px solid #ddd; color: #ccc; } Now everything is coming beautiful with PW, Thanks.
  21. I like to know how to make page Pagination i have category example name BMW and in this category i have listing for BMW and i like to show it in every 10 listing 1 page , 2 page etc.. i try to use it $results = $pages->find("limit=n, start=0"); echo $results->render(); and $results = $pages->find("id>1, limit=10, sort=title"); echo $results->render(); But is calling all pages in numbers and links i try and from http://processwire.com/api/modules/markup-pager-nav/ but maybe i am doing something wrong for example u have in http://processwire.com/skyscrapers/cities/columbus/ u have 2 pages i like to make like this to show only columbus listings 2 methods one with next numbers and previous and one method just next and previous u have one i this post http://processwire.com/talk/index.php/topic,28.0.html thanks
  22. And one site finished with Processwire http://www.artconstruction.org/ best look with mozilla and Chrome 8)
  23. I like to share Simple gallery in ProccesWire i use for popup ( rel='lightbox' ) lightbox.js CSS for gallery .gallery li { list-style: none; float: left; margin: 0 20px 3px 0; } .gallery { display: block; padding-left: 1px; padding-top: 1px; } #dropshadow { border: 5px solid; border-color:white; -moz-box-shadow: 4px 4px 9px #000000;; /* Firefox */ -webkit-box-shadow: 4px 4px 9px #000; /* Safari/Chrome */ box-shadow: 4px 4px 9px #000; /* Opera and other CSS3 supporting browsers */ -ms-filter: "progid:DXImageTransform.Microsoft.Shadow(Strength=4, Direction=135, Color='#000')";/* IE 8 */ : progid:DXImageTransform.Microsoft.Shadow(Strength=4, Direction=135, Color='#000');/* IE 5.5 - 7 */ } and in your template u will put like this, PS. images is fields <ul class="gallery"> <?php foreach($page->images as $img) { $t = $img->size(140, 100); echo "<li><a href='{$img->url}' rel='lightbox' ><img id='dropshadow' src='{$t->url}' alt='{$t->description}' width='{$t->width}' height='{$t->height}' /></a></li>"; }?> </ul> example is in attach, this is not so good but for beginner maybe will help,
  24. A fix and children problem with this code, <?php $aktivizo = $page->children("template=shtiminebanes, foto1banes>0, sort=-date, limit=4"); foreach ($aktivizo as $portfolio_item) { $image = $portfolio_item->foto1banes->first(); $thumb = $image->size(400, 100); echo " <table width='100%' border='0' cellspacing='2' cellpadding='1' class='ListTable'> <tr> <td width=60 height=60 align='center'><a href='{$portfolio_item->url}'><img id='photo' src='{$thumb->url}' alt='{$thumb->description}' width='{$thumb->width}' height='{$thumb->height}' /></a> {$portfolio_item->date}</td> <td> <a href='{$portfolio_item->url}'>{$portfolio_item->title}</a><p></td> </tr> </table>"; }; ?>
  25. Now is working perfect with this i need just to creat templates for all children and to start site maybe i will use and pages when i have more than 10 post in one children like in Prishtina, to make page 1.2.3 etc... http://www.kta-ks.com/kta/libri/garazha/prishtina/ Thanks Ryan
×
×
  • Create New...