Jump to content

gebeer

Members
  • Content Count

    1,007
  • Joined

  • Last visited

  • Days Won

    23

Everything posted by gebeer

  1. @pwired I stay there for max 5 month a time. So I get a tourist visa for 60 days with 3 entries which gives me 180days total and at the moment costs 90€. @Martijn I know that feeling.
  2. @BFD Calendar what is the $page->parent->name, when you are on a days page?
  3. I was asking if you visit Thailand often Ko Lipe is nice, indeed. I live in Ranong and love the little Island Koh Chang in the Andaman sea.
  4. Kop khun maak krap. Bai pratheet Thai boi mai?
  5. @Martijn cheers for the welcome. I can already see how PW can be addictive. Was sitting and playing around with it late last night, the night before and the night before...
  6. Hi Marcura, thanks for your thoughts on this. Custom error messages would sure be a great option to have in Form Builder. To build my own form code in the template and then use FB for processing seems like a little overkill to me as in my case I only need to send the form by email. As I saw in another thread, this should be fairly easy by using mail().
  7. @Soma Thank you for the suggestion. I would do the positioning by CSS only as a last resort. If it was up to me, generic error messages would be just fine. But unfortunately here my client has the say. So I need to do without Form Builder this time. Fortunately you posted great info on how to output forms in the frontend here in the forum. That should give me a good start. Cheers gerhard
  8. Hi Matthew, great to see you here and thanks for the warm welcome. Yes, my avatar is almost the same as in Seblod forum, only different color. The links you've posted are interesting and I totally understand some of the frustration with J! and Seblod. Working with PW is just so much smoother although the conversion will take me a while. So I might indeed throw some questions at the forum until I know my ways around this great piece of software better. So see you around. Cheers gerhard
  9. Hi Marcura, thank you for the info. Good point about customised error messages. I would need that, too. I'll join you with the feature request. Meanwhile I will have to code the forms by hand and use a jQuery validation script. Cheers gerhard
  10. Hello, I'm working on my first project with PW. Working with PW is amazing so far. As I am coming over from the Joomla world I am used to adding scripts to individual pages with a Joomla built in method. Searching for the PW way of doing this, I came along that post where I found this snippet of code: $config->scripts->add($config->urls->templates . "scripts/lightbox.js"); Great, I thought. But using just that snippet wouldn't include the script. I had to add a second snippet foreach($config->scripts as $url) echo "<script type='text/javascript' src='$url'></script>"; (which I also found in that other post) to actually load the script wherever I wanted in my template file. Lets assume you are working with the default PW Profile on a fresh install and want to load the lightbox.js only on the homepage and the template file for your homepage is home.php. Then you would include the first snippet in your home.php. The second snippet goes either in your head.inc into the head section or in your foot.inc at the bottom (whereever you prefer to load your js). This is a quite generic way to include scripts. If you wanted to have another script loaded only, lets say, on a contact page with template file contact.php the you just need to add a snippet, e.g. $config->scripts->add($config->urls->templates . "scripts/contact.js"); to contact.php. The second snippet foreach($config->scripts as $url) echo "<script type='text/javascript' src='$url'></script>"; already sits in your head.inc or foot.inc where you put it before and it will take care of including also contact.js because of the foreach loop. I guess that most of you already know this. But for a newbie like me I had to write this down to properly digest it and maybe it is helpful to someone else. Cheers gerhard
  11. Hello, I would like to have access control per field and wonder if this lies within the capacity of PW. Situation: Certain fields in the backend form for certain pages should only be visible to certain users. A regular user might fill data in fields title, fulltext etc. An admin user has additional fields available like meta_description etc. I'm fairly new to PW and can find access options in the template setup. But not in the fields setup. Is there a way to achieve this in PW? Thank you gerhard
  12. Hello all, before I start working with Form Builder on my project, I would like to know if it is possible to determine where the validation error messages get displayed in the form. My client requires to have validation errors put out underneath each individual field. Is this possible with the Form Builder module? Thank you gerhard
  13. Hello all, I'm pretty new to PW, coming over from the Joomla world. In J! there is a truncate method that does just that: truncate a piece of text. The problem with implode() or substr() is that it doesn't take html tags into account. So if I wanted to truncate a text that comes from a wysiwyg input, I might loose closing tags which can result in display/validation errors. So basically my question is: Does PW API provide a truncate method and if not what are your favorite ways to get this done? Thanks Gerhard EDIT: There seems to be a very popular PHP function for Truncate string while preserving HTML tags and whole words. And a slick jQuery plugin to limit text and expand to full length on click readmore: readmore.js
  14. Thank you diogo for the insight. I was thinking top to bottom. Your solution looks more logical, though. But all roads lead to rome, as they say
  15. Hello all, I'm new here and this is my first post. Found PW a couple of weeks ago and working on my first project. So far I can say it is fun developing with PW. I like the whole concept, the documentation is great and the forum is the best I have seen so far. I had the same problem with highlighting parent menu items when one of their children is the current page. Reading this thread and following the link in previous post, I came up with a solution that is working great for me. Here's my piece of code: foreach($page->rootParent->children as $child) { $class = $page === $child || $child->children->has($page) ? " class='active'" : ''; ?> <li><a<?php echo $class; ?> href='<?php echo $child->url ?>'><?php echo $child->title ?></a></li> <?php } ?> The bit that does the highlighting for parent menu items is $child->children->has($page) As easy as that I was first trying to solve it with native PHP strpos funtion before I realised that the PW API offers the has() function which really makes life a lot easier. If there are better ways to achieve the same goal, I would love to learn them. Cheers gerhard
×
×
  • Create New...