Jump to content

diogo

Moderators
  • Posts

    4,296
  • Joined

  • Last visited

  • Days Won

    79

Everything posted by diogo

  1. I used responsive design here http://www.max-cafe-bar.de/. but no images were involved
  2. I'm glad it's too complex for you guys too i felt a little dumb while reading those docs... but still, I really value any effort of making different tools be able to communicate and work together. I have a look at ProcessPageSearch, and see if I can get a sense of it.
  3. I'm not really planning to do something with it right now, i was just curious after reading that article, and all that followed. But, ya, would be nice It would! Would also be nice if it would be on the core, and with documentation. I imagined that doing this would be something trivial with PW, but couldn't find anything on the site or on the forums about it... and since it's something that some CMS's make a big fuzz about... Also, what are your thoughts on CMIS? I'm all for standards implementation, and this looks pretty interesting. Again... this is a muddy area for me, sorry if i'm not making pertinent questions
  4. after reading this article http://www.searchenginejournal.com/why-arent-you-paying-attention-to-apis-for-your-cms/41155/, I started looking a bit deeper on what it means and how hard would it be for PW to have such an API... I didn't come to a conclusion, as would be expectable from such a noobie in such things but still, I wanted to post here some of the documents I stumbled on to tease you people to have a thought on this. http://ecmarchitect.com/archives/2009/11/23/1094 http://www.oasis-open.org/committees/tc_home.php?wg_abbrev=cmis http://rest.elkstein.org/ http://docs.fuelphp.com/general/controllers/rest.html http://wiki.alfresco.com/wiki/CMIS http://drupal.org/project/cmis http://www.elefantcms.com/wiki/RESTful-APIs http://mambo-manual.org/display/dev/Interacting+with+the+RESTful+API
  5. In this case, what you need is to create a custom button that will put <span class="custom"></span> around the content. I know it's possible to do it in tinyMCE, but I wonder if it's possible by using the additional tinyMCE setting on each field, so you don't have to mess around with the module.
  6. You can assign fields to templates like this: $template = $templates->get("some_template"); $template->fields->add("newfield"); $template->fields->save(); this code is taken from here http://processwire.c...bles/templates/ So, just make an array with all the templates you want the field to be on, and go for it $ts = array("home", "basic-page", "search"); foreach($ts as $t){ $template = $templates->get($t); $template->fields->add("newfield"); $template->fields->save(); } EDIT: the field will be on the last position of each template
  7. I agree with Adam, no plausible reason for js here
  8. Still, it's a good idea to rename it to .php if it will be in a not protected folder. Never to much to remind
  9. Not if you include it with php... in this case, (.js) wouldn't be any different from (.inc)
  10. Ok, if the js file stays in the assets folder, you really should do this...
  11. well, you can... just put <?include(yourfile.js);?> between <script> tags
  12. Your code looks longer mainly because your variables and field names are also very long. The same code looks shorter like this: $settings = $pages->get(123); $sname = $settings->simple_name; echo $sname; You can put all your variables on "settings.inc" file, for instance, and include it on the "head.inc" file, or whichever file that you know will be included by all the templates. EDIT: changed get('name=site-settings') to get(123) to make it even shorter
  13. I don't use Mac, so I can't help you here. Let's wait that MAMP users appear
  14. Must be the permissions. Give maximum permissions recursively to all the folder to see if it works, and then adjust them to the required ones. If you need help for doing it on mac, check here http://support.apple.com/kb/HT2963 EDIT: And welcome to the forum
  15. Hm... I think the writing style should be free
  16. It's great that people are coming with modules like this, but the reason PW is so flexible, is because it's so easy to build your own snippets of code to achieve this kind of things. I have mixed feelings concerning the modules, and tend to prefer the idea of the snippets repository...
  17. As I understand, you want to apply the color to emphasize those lines. I think it would be best to do it with css. So, just make those lines "Italic" on the text area, and colour them with css, based on the class of that article: article.category1 em {color:'blue'}; article.category2 em {color:'red'}; article.category3 em {color:'green'}; article.category4 em {color:'yellow'}; EDIT: or choose "bold", or "underline" instead... but i would say that em is more semantic in this case
  18. Hey, no problem at all! Don't hit yourself mate
  19. Have a look here: http://processwire.com/talk/topic/364-failed-test-for-json-support/
  20. In this case, would even be better to have a page and a template (not connected with a file) only with the fields for the sidebar, and call them from building_block_a.inc.php like this: $pages-> get(123)->name_of_field where 123 is the id of the sidebar page
  21. I think there is a limit, so the website doesn't accept an infinite number of different urls for the same page. EDIT: I thought I should explain this better. You should have the segments under control so you can prevent the URL to accept anything that is thrown at it. So, it makes all the sense to have the limit. Also pay attention to what is advised when allowing the segments:
  22. Adam, I think we just answered at the same time... don't be so harsh on yourself
  23. On Robert's code, I count 18 characters less if you do
  24. Ya, I know! But if the server doesn't support <?, it won't support <?= neither... So, what I'm saying is: if you are going to use <?= in one statement, why not use <? in all the others also? Or, if you are concerned that the server doesn't support them, don't use neither. EDIT: Or am I wrong here? I thought they where both shorthands
×
×
  • Create New...