Jump to content

Martijn Geerts

PW-Moderators
  • Posts

    2,769
  • Joined

  • Last visited

  • Days Won

    31

Everything posted by Martijn Geerts

  1. I don't see that color at all.
  2. I needed to update this module as I needed the enhanced functionality. ( putting images, audio etc in the RSS ) my tip: Love ProcessWire
  3. <quote>pasting in snippets from all over the internet</qoute>, makes good gremlins.
  4. On a template named 'horse' add two fields with the type of Page. (both Single page) Name one field 'father' and the other 'mother'. ( Allow new pages to be created from field?, Set to yes ) I advice you you use Page autocomplete (not installed by default) as horse lovers know all the horses by name Make both fields required (force the editor to fill it in), but then you have to create one "Null Horse". the selectable parent of the 'horse' is always 'horses', The Null Horse is a Page with template horse and it's not an existing horse. When they don't know their parent(s) they can select the Null horse. When the Null horse is reached it's end of the tree. // Structure for horses, all on the same level home | +-- horses (horses template) \ +-- abram (horse template) | +-- betty (horse template) | +-- cinderella (horse template) | +-- dromedary | +-- etc..
  5. Which Module do you use? MarkupRSS ? I don't know if this helps, but at least it's try-able I updated Ryans MarkupRSS module as there was an issue with date & I added the ability to use enclosures. MarkupRSS is not yet updated in the core, but you can get the updated version with the link below. MarkupRSSEnhanced.module ( be aware that this one has a slightly different name )
  6. Be aware of variable scoping $modules would be $this->modules For expiring the cache you should look for the right syntax, as MarkupCache files are separate folders, delete able by its name.
  7. You can turn that around, should be easier. Set it to "no" and delete the ones you want to expire.
  8. I have recently used this code to create CSV, works great. // array, with for each row an array $array = array( array('val 1 - row 1', 'val 2 - row 1', 'val 3 - row 1'), array('val 1 - row 2', 'val 2 - row 2', 'val 3 - row 2'), array('val 1 - row 3', 'val 2 - row 3', 'val 3 - row 3'), etc... ); $out = ''; $handle = fopen('php://temp', 'r+'); // temp read/write file-like wrapper foreach ($array as $line) fputcsv($handle, $line, ',', '"'); rewind($handle); while (!feof($handle)) $out .= fread($handle, 8192); fclose($handle); echo trim($out);
  9. Thanks for pointing that one out. Didn't knew there was that option... Has it been there from the start ?
  10. Is the mbstring extension for PHP loaded ? // If this function tells something like: Unknown function 'mb_strlen' // then multibyte support is not functioning/enabled <?php mb_strlen("test"); ?>
  11. Is the mbstring extension for PHP loaded ? // If this function tells something like: Unknown function 'mb_strlen' // Then multibyte support is not funtioning/enabled <?php mb_strlen("test"); ?> Why the hell they have invented tabs in browsers ? This answer belongs in an other tab and in an other other topic (dumb me)
  12. MarkupCache, doesn't get triggered upon page save, it has it's own time schedule to expire. (second parameter) Are you sure you mean MarkupCache and not the Build-in cache (Template Level) ? Thanks Teppo: <advertisement>ProcessWire caching explained</advertisement>
  13. @cstevensjr, congrats. - The most used app on my mac: Quicksilver. (I mainly use it as app loader/switcher) - I love this web environment. - AppTrap (Remove useless settings & stuff from apps you trash) - Sip (Pick & bookmark your colors to use it everywhere ) - Hex Color Picker (Add a hex color picker to every application. )
  14. There's a beneficial thing for that Module. You can quickly find embedded video's just by searching video images.
  15. Look at the code provided by Wanze. Or you could trigger a delete of the cache after Pages::save class DeleteMarkupCache extends WireData implements Module { public static function getModuleInfo() { return array( 'title' => 'Delete cache module', 'singular' => true, 'autoload' => true ); } public function init() { $this->pages->addHookAfter('save', $this, 'deleteCache'); } public function deleteCache($event) { $page = $event->arguments[0]; if($page->template != 'wanted-template') return; // now do your logic. } }
  16. It's a returning thing we all have, adding personal/company information on a website. Would it be beneficial to have a fieldtype that handles all that contact information ? What do you think ?
  17. @bwaked, from the most recent posts you've done I conclude you don't fully understand the basic principles of the Wirearray / Pagearray. I can imagine that those are a little harder to understand. Next, I think to see is that you're still struggling with PHP. This is not a problem on it's own. But when you try to learn the ProcessWire basics next to it, it is maybe one little thing to much. Most people learn from little steps, expanding on the things already learned. The PW docs are written to be as simple as possible and on the same time it covers all the basics you'll need to know to get started.
  18. All those pages are a good read. And if read well, at least half the questions you asked would not have been asked.
  19. a good read
  20. In Admin > Setup > Fields > Edit Field: name-of-the-field [input Tab] then use: Custom selector to find selectable pages. under the Selectable Pages
  21. You're not alone Adrian...
  22. To extend adrian, look at the docs about images. Very well written.
  23. // This code should be in the docs, not because of this context, // but because of the collaboration between $event->object and $event->arguments(0) wire()->addHook("PageArray::compare", null, function($event){ $a1 = $event->object; $a2 = $event->arguments(0); $event->return = "{$a1->sort('id')}" == "{$a2->sort('id')}"; });
  24. Min / Max, had some fun with that. it doesn't matter witch one is higher or lower . the lowest value is low and the highest is high. Initially I went this ways cause it was easier in the script, after all it doesn't hurt. ( maybe have to add some javascript to catch it ) The first row is now part of the data set ( lazy mans way ) It will complicate the scripting if the first row would actually be a header. And I don't know it's worth the overhead. But the visual (sticky) behaviour you can put on/off. (Inputfield Setting - First row) Your idea of setting the headers, would be real headers ( not part of the data set )
×
×
  • Create New...