Jump to content

Search the Community

Showing results for tags 'solved'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Welcome to ProcessWire
    • News & Announcements
    • Showcase
    • Wishlist & Roadmap
  • Community Support
    • Getting Started
    • Tutorials
    • FAQs
    • General Support
    • API & Templates
    • Modules/Plugins
    • Themes and Profiles
    • Multi-Language Support
    • Security
    • Jobs
  • Off Topic
    • Pub
    • Dev Talk

Product Groups

  • Form Builder
  • ProFields
  • ProCache
  • ProMailer
  • Login Register Pro
  • ProDrafts
  • ListerPro
  • ProDevTools
  • Likes
  • Custom Development

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests

  1. Hello, So, I have course pages and faculty pages. When I create a new course, I can associate it with 1 or more faculty members by adding them to the course_instructors Page field. When I visit the faculty member's page, I want to view the courses they teach. I'm trying to do this with a selector: // on the faculty member's page $spring_courses = $pages->find('parent=/courses/spring/, course_instructors=$page'); $spring_courses is empty. Just to reiterate, course_instructors is a page field that can have multiple pages in it (multiple instructors). I'm basing my method on this post. Thanks for any suggestions!
  2. The search form on the basic install works fine and is great... But if I add a new text field, i can't get it's content to appear in my search results. Do i need to configure new fields somehow to make them 'searchable' ? alex
  3. So, I am doing something a bit complex here, but I have it working on a static site. So I know it all works as planned. However I can't get it to work inside of processwire, and I am not sure why. Let me explain what is going on. So I have built a template with my form code. Then I have a js file, that uses AJAX/php to mail me a copy of what the form contained upon submission. This is due to the fact the form is going to a third party processor. They do not send nice pretty copies, but they do send a confirmation, which is enough for me to match them later by hand. So my issue is lies here: I have created a template that contains this information, then I have included my javascript in the header. However, I don't know where to place the mailer.php and the other file that it calls. I have tried placing them in templates/includes/ then calling them in my javascript like so. //code $.post('http://examplesite.com/site/templates/includes/donate_in_memory_mailer.php', $('form#donate').serialize(), function(data){ }); //code then inside of that donate_in_memory_mailer.php I have an include for another .php file. I have done it's include similar: //code include 'http://examplesite.com/site/templates/includes/memory_mailer.tpl.php'; //code However, it appears this isn't working. I cannot get it to work, I have even tried putting this folder in my root directory. Does anyone have any ideas. I would assume it wasn't a processwire issue, but when I can make everything work the same exact way on another static site I get confused. Please I hope this is just a simple fix, its the last part of the first site I have ever built with processwire! Thanks!! -Joseph
  4. Often, the pages I find myself referencing in a page field (whether through asmSelect or otherwise) are very simple. They might be categories, tags, or something along those lines, but they only contain a single text field. In cases like these, it would be great to be able to add new ones from the page that contains the referencing field. So if, for instance, I were adding a new page to a site, and had a "topics" field that selected pages from /topics/, and I realized that topic didn't exist yet, I could add it from the page without having to go back to the page tree, navigate to /topics/, create a new topics page, publish, then return to my unpublished new content page. I suppose the most straightforward plan of attack would be to create a new inputfield module, but ideally, this could be applied to any of the existing ones, whether checkboxes, asmSelect, or auto complete. Can a module extend other modules in that way?
  5. Using the $sanitizer->username() function on an email address returns the email address as is. This behavior is expected and correct according to the function's definition (in the cheat sheet), which is: However, when adding a user manually in PW, the name field shows a different formatting requirement: So inputting email@domain.com into that field automatically changes it to email-domain.com. (The "." does in fact stay in there although its not part of the defined character requirement. No biggie.) Shouldn't those two formats match? Background info: The reason this came up is because I'm allowing folks to signup for my parish's website to access parishioner-only content on the site. However, instead of usernames, I'm relying on email addresses for registering and logging in (at least from their point of view). Since each user in PW requires a username, I'm making their username a sanitized version of their email address and was going to use the $sanitizer->username() function to automatically create their username based on their email address. But given the current sanitizing convention of $sanitizer->username(), I'll have to create a new sanitation function to accommodate. Is there a reason for the discrepancy that I may have overlooked?
  6. I've seen references to the page title, but where in ProcessWire can I set the site title, and how do I include it in my templates? My total experience with ProcessWire is about two hours, but it looks very promising. I develop primarily in WordPress, but the "post" structure has proved itself to be limiting.
  7. I have settled down using $session variable instead of superglobal $_SESSION. There is one big difference though. If user logs in then PW $session is lost and new one is acquired. I don't know if that is intended behavior? I realized this on my shopping cart module since people lose their carts after logging in. Of course I could start using $_SESSION here, but wanted to ask first if $session works right and if it does, why it is so?
  8. I am working on a simple photo gallery site where I have level one: Home, Galleries, Statement level two: Set 1, Set 2, Set 3 etc. (under Galleries) level three: a template that cycles through the child photos of Set 1, Set 2 or Set 3 set by using this code: if ($page->prev->id) { echo "<a href='{$page->prev->url}'></a>"; } else { $lastpage = $page->siblings->last(); echo "<a href='$lastpage->url'></a>"; } echo "<a href='{$page->parent->url}'></a>"; if ($page->next->id) { echo "<a href='{$page->next->url}'></a>"; } else { $firstpage = $page->siblings->first(); echo "<a href='$firstpage->url'></a>"; } echo "<img class='centered' src ='{$page->images->first()->url}'"; The level one and two navigation menus show the the active links as "on" and highlighted according to my CSS declarations at level two. For example: Home Galleries Statement [set One] [set Two] [set Three] [Thumbnail 1] [Thumnail 2] [Thumbnail 3] But clicking on the Thumnail 2 and cycling through turns off the Set Two link: Home Galleries Statement [set One] [set Two] [set Three] <prev [image detail] next> What do I need to add or change to make the second level navigation show as being "on"? This is the code I am using in the header included in all templates at level 1, 2, and 3: <div id="primary-menu"> <?php // Create the top navigation list by listing the children of the homepage. // If the section we are in is the current (identified by $page->rootParent) // then note it with <a class='on'> so we can style it differently in our CSS. // In this case we also want the homepage to be part of our top navigation, // so we prepend it to the pages we cycle through: $homepage = $pages->get("/"); $children = $homepage->children; $children->prepend($homepage); foreach($children as $child) { $class = $child === $page->rootParent ? " class='on'" : ''; echo "<a$class href='{$child->url}'>{$child->title}</a>"; echo " "; } ?> </div> <div id="secondary-menu"> <?php echo "<hr>"; // Output subnavigation // // Below we check to see that we're not on the homepage, and that // there are at least one or more pages in this section. // // Note $page->rootParent is always the top level section the page is in, // or to word differently: the first parent page that isn't the homepage. if($page->path != '/' && $page->rootParent->numChildren > 0) { // We have determined that we're not on the homepage // and that this section has child pages, so make navigation: foreach($page->rootParent->children as $child) { $class = $page === $child ? " class='on'" : ''; echo "<a$class href='{$child->url}'>{$child->title}</a>"; echo " "; } echo "<hr>"; } ?>
  9. It would be great if there would be an easy way to add flash-type of session variables. Here is citation from codeigniter docs:
  10. I have created a new user role, that role is not able to create thumbnail crops using the thumbnails module. When clicking 'Thumnails' it just opens a window with the home admin page. It works fine for the main superuser role. I tried allowing all permissions for the new role but no luck. Using processwire 2.1 - Alex
  11. Is there a way to hide the publish button for a user? I've had a look around the forums and I can't see that this has come up before, but what I'd like to do is have it so that certain user groups can add pages, edit and save them but not publish them. The idea is that the new pages then have to be approved by someone with higher permissions before the page appears on the site. Linked into this, I'd also like the ability for the user not to be able to edit a page once it's published if that makes sense? So they can add a page (article in this case) tweak it and edit it, let someone with higher perms check over it and publish it, and then at that point the author wouldn't be able to edit the page. I feel like this should be reasonably easy to accomplish with a module but just need a friendly shove in the right direction Something completely different that crossed my mind but would be useful in my situation (and maybe others?) would be the ability to hide a field depending on the user group and set a default value instead. The scenario for this is articles again - I've been using an autocomplete field to tag authors to articles (very occasionally it will have multiple authors), but for users of a certain group I'd like this field to be hidden instead and default the value to their user ID - not sure if that's actually possible? It's not 100% necessary, but again if there's a way to do it with a module I'd happily give it a shot Just as an extra, yet not entirely relevant, piece of information, I was also considering adding a checkbox to the end of the Article temlpate so that the author could then tick the box to say it's ready for review by an editor, and then have a list of articles ready for review on the admin homepage. That might be of interest to someone else working on some sort of approval-based site section, so I'll happily share the code
  12. I have been searching through the Forums and I found something related but I don't think this situation applies. I have an iFrame tag for an embedded Google calendar. I want to put it in a page but I don't want it in the main template. Should I make a "mini" template and call it or is there a way to put the tag in via the CMS GUI? It seems that every time I click on the "HTML" button on a text edit field and put it in, it gets filtered out. even custom <div> tags get removed. Any ideas or suggestions?
  13. I just discovered a bug I think. While tracing down a PW site with lots of assets and pages to scan for all images and links in the RT text fields, I discovered that there's some multiple links that appear to be empty, not visible. So I figured that when inserting a external link in the RT, using the PW link dialog, then afterwards open it again to edit, it then inserts a invisible empty <a href="someurl"></a>" right before the link meant to be changed (which stays untouched). I'm sure it's not browser specific, but my guess is that the PW inser link plugin need a check. It only seems to fail with manually entered external links. I would consider this urgent to fix soon. I now need to go manually go through all them because it isn't something the client nor me have known. Though with the bootstrap script I wrote to scan whole site and look for such things it's a whole lot easier thanks to the easy as pie API. Thank for anyone confirming/reproduce this bug.
  14. Hi all! As always, a pleasure working with PW! But I'm stuck with the following. I have a blog-type page where each entry has a date time field. I've configured the date output as: "j \d\e F \d\e Y". But the month is shown in English (ex. November) I need to use the date in spanish, but I've read some php docs and they say I should use setlocale with strftime. But the output date I get from PW should be as an Unix timestamp I believe. How would you approach this?
  15. Hey guys, Have a question, I am installing PW on my server now and looks like I don't have json support on it. When I contacted my server provider I was told that my server doesn't support json extension I don't understand why, because after reading about it looks like json its regular php extension. Well the question is; How important is json to PW, will PW work without any problem without json and will I loose some functionality? Thanks Leslie
×
×
  • Create New...