Jump to content

arjen

Members
  • Posts

    1,222
  • Joined

  • Last visited

  • Days Won

    8

Everything posted by arjen

  1. It's the other way around Thanks nik!
  2. I've made a simple module called MarkupBox which is not installed in the CMS, but the files are in the module directory (/site/modules/). When I call the module from a template it returns the value. I suppose there is a way to check if a module is installed, but I can't find it in the code or in the forums. I'm looking for someting like: if ($modules->get("MarkupBox")->isInstalled()) { // Do something } Module: public function render() { $out = "Test"; return $out; } Template: $box = $modules->get("MarkupBox"); echo $box->render(); Thanks!
  3. Thanks! Will check and use github to report these kind of things.
  4. When using this setting on a Page Fieldtype... ... and displaying that Fieldtype (author) in a Fieldset (tab_attributes) ... ... the autoload won't work. It doesn't give any options. No JS or other errors in my console. When I save the Fieldtype (author) outside the Fieldset (tab_attributes) it works fine. Other options like PageListSelect or PageListSelectMultiple seem to work fine within a Fieldset. I'm running the latest dev branch. Is this is bug?
  5. The topic is over a year old, but it doesn't seem possible.
  6. Really nice UI solution when working with more than 2 languages. Most often the simplest solutions are the most difficult to think of.
  7. No offense roelof, but I think it would be wise to take a step back and do some php tutorials. You can drop the last ?>. You can't use php in php. See this example below how to fix it. Notice the {} around the variables and the single quotes in the double quotes. For an editor I'm using Sublime Text 2. Don't edit php files in a textarea please <?php if ($page->id == 1) { echo "<link type='text/css' href='{$config->urls->templates}styles/twentythings.css' rel='stylesheet' media='screen' />"; }
  8. I think you mean Template File Editor. When looking for modules make sure you look in the modules site.
  9. @Vineet Sawant, it seems to be Simple Grid. @Marty Walker, great site!
  10. arjen

    Hanna Code

    [[gallery tag=skyscrapers" sort="-created" limit="10" paginate="true]]
  11. @vayu, you might want to use strftime since that will respect your locale. So you might want to convert it. Can't really tell if that's best practice but it might work. @digitex, I made a mistake updating my code partially. Make sure you use: $t = $modules->get('MarkupTwitterFeed'); instead of: $t = new MarkupTwitterFeed; That worked for me.
  12. Try this: https://api.twitter.com/1/statuses/user_timeline.rss?screen_name=YOURNAMEHERE Edit 1: Doesn't seem to work since the last couple of days? The finally shut it down. Edit 2: Seems Ryan updated the module. You don't seem to need a feed anymore.
  13. I only use the sass preprocessor while developing on my local machine. I deploy the generated css to the live site. I might be wrong, but this is best practice I believe. I haven't got time but you can search Google for sass workflows.
  14. Yeah, I was a little bit worried with all the Ruby stuff, but it's just to preprocess the css. You don't need it on your own webserver.
  15. What about: $i = 0; foreach ($items as $item) { $i++; if ($i == 1) { // Do stuff the first item } else { // Do stuff the other items } }
  16. I've been using Susy for some small personal projects and once you get the hang of it every other framework feels like a bloat. Their adagium is: Your markup. Your design. Our math. Sound familiair?
  17. You are saving the page? Are you getting any errors? You can enable the debug function in /site/config.php or check the /site/assets/log files.
  18. Just wanted to say: great module teppo. It seems nicely structured and documented so I've been learning some new things!
  19. Thanks for sharing, harmster!
  20. It is as simple as this: <?php /** * Page template * */ include("./head.inc"); echo $page->body; echo $page->your_field_name; echo $page->another_field_name; echo $page->third_field_name; include("./foot.inc"); But do finish to those tutorials. You easily get a grasp of all the possibilities.
  21. Welcome tv_855, you might want to checkout some tutorials first. For the fields to work on the frondend you have to include the fields in in your php files. Checkout these: Basic website Another basic planet based tutorial
  22. Just tested this on a site and it seems to works here fine. I'm running PW 2.3.0 with FormBuilder 0.2.1.
  23. Did you search?
  24. If you want to translate text, labels and stuff you can do this by wrapping your texts like: <?php echo __("String to be translated."); Read more on this page how to work this out in the backend. Translating files is really easy!
  25. $s is like one item which belongs to the group $skyscrapers. I prefer to name them $skyscraper so you have: foreach($skyscrapers as $skyscraper) { echo "<li><a href='{$skyscraper->url}'>{$skyscraper->title}</a></li>"; } See more about a foreach in the manual. If you want to limit the number of results you can do this: $skyscrapers = $pages->find("template=skyscraper, limit=10"); There are some great tutorials in this forum or on the wiki. I would recommend to do them all. I'm coming from TXP too and and while I still like it very much, ProcessWire is second to none when it comes to structuring data.
×
×
  • Create New...