Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 01/18/2012 in all areas

  1. This is the method that I use and find it really handy. The main.php file for processwire.com has this at the top: if(strpos($page->body, '<p>https://www.youtube.com') !== false) { $replacement = '<iframe width="640" height="360" src="https://www.youtube.com/embed/$1" frameborder="0" allowfullscreen></iframe>'; $page->body = preg_replace('#<p>\s*https://www.youtube.com/watch\?v=([^\s&<]+).*?</p>#iu', $replacement, $page->body); }
    1 point
  2. If you use Thumbnails module, then you don't do the resizing on the template file. So no size() method if you use thumbnails. In your template code I would change this: $image = $item->images->first(); To this: $thumb = $item->images->first(); Then I would remove the next line (where you use size() method). Rest of the code you can keep, but change {$thumb->url} with $thumb->getThumb('thumbnail'). I'm not sure, but you might need to write it like this: echo "<img src='". $thumb->getThumb('thumbnail') ."' />
    1 point
  3. Maybe could be nice if the users system will be connected with a customizable registration page, in this way we can create specific fields for users and have a right page for registering.
    1 point
×
×
  • Create New...