Jump to content

diogo

Moderators
  • Posts

    4,320
  • Joined

  • Last visited

  • Days Won

    80

Everything posted by diogo

  1. So, now the site will be only in portuguese? You don't need any of the spanish information? I don't know if it's possible to do it as you are thinking, but it wouldn't be too difficult to make a script that runs through all the pages and copy the content from the portuguese fields to the default fields. foreach($fields as $field){ $page->setOutputFormatting(false); $user->language = $languages->get("portuguese"); $pt_field = $field; $user->language = $languages->get("default"); $field = $pt_field; $field->save(); } This is only to show the concept, and i don't have any idea if it works...
  2. Great to know ceberlin. I'm not purely a programmer, so I wouldn't see myself entering a project where the design is ready, but if you would need web design and graphic design I would be interested for sure.
  3. Very interesting tool from Mozilla, Just tested it on a site only by pasting a script,and works fine https://towtruck.mozillalabs.com/
  4. Processwire is a great application for netbooks http://www.netbookfreeware.com/free-cms-application-for-netbooks-processwire
  5. That's true
  6. Can't stop laughing
  7. That wasn't a good idea, you didn't say anything really wrong there, but now it looks like you did... And the referee was too quick with the yellow card
  8. Lea Verou explains Regular Expressions. This is actually very easy to follow! Her RegExp playground is pretty cool too http://leaverou.github.io/regexplained/. And since we are at it, check out this Regexp editor by Cody Lindley http://jsfiddle.net/codylindley/u4E6P/
  9. Hey, you both, calm down will you?
  10. Think of the template file as a puzzle, and the inc files as the pieces of the puzzle. The goal is to draw an html file in the browser, and each piece does it's part. Because php doesn't understand html tags, the pieces of the puzzle don't correspond necessarily to the complete html tags, they just draw the puzzle from top to bottom, unaware of what they're drawing, until it's complete.
  11. Thanks NooseLadder, didn't know this. One of my favourite albums is "the Pixies Peel Session, that starts with an amazing version from "honey pie" from the Beatles. Not good for programming though I'm listening to my playlist for working on grooveshark http://grooveshark.com/playlist/Diogo2/29241870
  12. The home page is the parent of all other pages. You can rename it if you want.
  13. Most of the examples that you will find here on the forum use the first method, and thats's also the one I tend to use, but the second method has it's merits. If you worry about how the source code looks (before firebug and chrome developer tools it was important for debugging) the second method respects the indentation and keeps the html tidy, although you can also achieve that inside a php with \t and \n (tab and newline characters): echo "\t\t\t<li><a href='{$planet->url}'>{$planet->title}</a></li>\n";
  14. @pwired, i think Macrura's 'wiring' has the same origin as the 'wired' in 'pwired', and not in 'wireframing'
  15. Welcome jzvanenk! Answering directly to your question. The snippets don't go inside the fields, they go directly on the template files. The code you have on the template files is PHP, just like the snippets yo are talking about. So, when you have this on the planets tutorial: <html> <head> <title><?php echo $page->title; ?></title> </head> <body> <h1><?php echo $page->title; ?></h1> <h2>Type: <?php echo $page->planet_type; ?>, Age: <?php echo $page->planet_age; ?> years</h2> <p><?php echo $page->planet_summary; ?></p> </body> </html> You can also have this: <html> <head> <title><?php echo $page->title; ?></title> </head> <body> <header> <ul id="all-planets"> <?php // list all planets and link to their pages foreach($pages->get("/planets/")->children as $planet){ echo "<li><a href='{$planet->url}'>{$planet->title}</a></li>"; } ?> </ul> </header> <h1><?php echo $page->title; ?></h1> <h2>Type: <?php echo $page->planet_type; ?>, Age: <?php echo $page->planet_age; ?> years</h2> <p><?php echo $page->planet_summary; ?></p> </body> </html> edit: that is the same as this (entering and leaving php to write html): <html> <head> <title><?php echo $page->title; ?></title> </head> <body> <header> <ul id="all-planets"> <?php foreach($pages->get("/planets/")->children as $planet): ?> <li> <a href="<?php echo $planet->url; ?>"><?php echo $planet->title; ?></a> </li> <?php endforeach; ?> </ul> </header> <h1><?php echo $page->title; ?></h1> <h2>Type: <?php echo $page->planet_type; ?>, Age: <?php echo $page->planet_age; ?> years</h2> <p><?php echo $page->planet_summary; ?></p> </body> </html>
  16. (but wait! there is someone acting very suspicious...)
  17. Globaly, it's allways deactivated since you won't use it anymore. It would only work without JS. Sure, I would be interested. Just tell me when it has to be done
  18. Maybe you could simply deactivate the gallery link and use all the h5 to close the panel. $('h5.side-title a').click(function(){ return false; }); then you could: $('side_container.slide.active h5.side-title').click(){ //code for closing });
  19. The explanation was a bit confusing... What is the container? What is the link? What does it mean when the container is not active? edit: Not that, I guess this must be because the page is being worked on
  20. what??
  21. You don't need it to be a real link. just give the whole area a class and bind the click event to that class. then, remove the class when the area is clicked. To style that class to look like a link you only need cursor:pointer. $('.linkClass').click(function(){ $(this). animate({'margin-left':0}). removeClass('linkClass'); });
  22. I like your idea, but it's also very simple to do this only with css http://www.hongkiat.com/blog/css3-attribute-selector/, or if you really want it to be crossbrowser you can also do this in php: echo "<a href='{$f->url}' class='file-". get_file_extension($f) . "'>" and use the class on the css. edit: not saying my solutions are better though
  23. diogo

    What me impressed today

    ...and the typography
  24. Glad you solved it. Welcome to the forum ps: moved the topic to "General Support"
×
×
  • Create New...