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. Hey. I had installed processwire two months ago and been building up the new site in the background on pw, while the old site was still online. I didn't have time to work on it so didn't look at it all April and now it doesn't work anymore. I can't get any pw page to show, not even the admin page ... it always displays the index.php file in the root directory if I try to go to any pw page. Can anyone help me? Can't figure out what happened! Many thanks in advance and best wishes Lars
  2. I've been reading up on a few posts on categories but I'm struggling to get them working. I saw a video from PW1 and the example seems nice and simple:Output the categories, click one and the list of entries gets filtered. I tried to replicate that but no joy. I can't seem to understand how Ryan can output $page->categories from his page when really the categories are surely part of children()? Is it really possible to filter categories of events or news this simply? I've seen other examples in the forums which look much more complex (urlSegments and the like). I currently have my category page set up as a child of home, and categories as its children. Before seeing that video, I had managed to output the categories like this: <div id="events_index_side"> <?php if ($pages->find("template=category")) { ?> <div class="events_index_side_box"> <h5 class="page_header">By category</h5> <ul> <?php $categories = $pages->find("template=category"); foreach ($categories as $category) { ?> <li><a href="<?php echo $page->url . $category->name; ?>"><?php echo $category->title; ?></a></li> <?php } ?> </ul> </div><!-- /.events_index_side_box --> <?php } ?> but using this method, I'm not quite sure how I can get the page to reload with just those categorised entries? Would appreciate if anyone could give me a shove in the right direction. Thanks.
  3. Hi, I'm setting up some next/prev page linking code. I only want those links to show if the page's publish_date field is less than today. Here's my convoluted and cobbled-together code: <?php $today = time(); if($page->prev->getUnformatted('publish_date')<$today) echo "<li id='prev'><a rel='nofollow' title='{$page->prev->title}' href='{$page->prev->url}'>{$page->prev->title}</a></li>"; if($page->next->getUnformatted('publish_date')<$today) echo "<li id='next'><a rel='nofollow' title='{$page->next->title}' href='{$page->next->url}'>{$page->next->title}</a></li>"; Firstly, is there a way to simplify this? Secondly, if there's no value returned for the previous page (for example) it still outputs the HMTL. ie: <li id='prev'><a rel='nofollow' title='' href=''></a></li> Thanks for any help. Cheers Marty
  4. I'm building a little photography portfolio site and I'm running into a question with image->size(). For most applications, the sizing to fit and center-crop is great, but for this site, I want to have a maximum width and maximum height, so that if the photo is narrower than the specified size, it gets smaller and has space on the sides, and if it's shorter, it gets space on the top and bottom. In other words, I'm looking to size the image such that it never gets cropped; you see the whole image even if it means making it smaller. Is there a way to do that with size()?
  5. 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?
  6. Hi guys I'm tweaking a module of mine (SocialTwitterFeed) to do something else and need to have an ASMSelect in the config screen -this bit is simple enough, however how do I limit it so the user can only select ONE page? Here's the current code: private static function _createInputfieldASMSelect($aName, $aTitle, $aValue, $aDesc='', $aPath='/') { if(!isset($aValue) || !is_array($aValue)) $aValue = array(); $modules = Wire::getFuel('modules'); $field = $modules->get("InputfieldAsmSelect"); $field->attr('name', $aName); $children = wire('pages')->get($aPath)->children; foreach($children as $child) { $field->addOption($child->id, $child->title); } $field->attr('value', $aValue); $field->label = $aTitle; $field->description = $aDesc; return $field; } In this case, it's being used to select a field, so here's the more relevant code that works, but currently selects multiple fields instead of just one: private static function _createInputfieldASMFieldSelect($aName, $aTitle, $aValue, $aDesc='', $aPath='/') { if(!isset($aValue) || !is_array($aValue)) $aValue = array(); $modules = Wire::getFuel('modules'); $field = $modules->get("InputfieldAsmSelect"); $field->attr('name', $aName); $children = wire('fields')->find('id>1'); foreach($children as $child) { $field->addOption($child->id, $child->name); } $field->attr('value', $aValue); $field->label = $aTitle; $field->description = $aDesc; return $field; } I posted both as thought the latter might be useful to someone already familiar with the former, and I'd be interested to see if there are any major differences required for the two. Cheers! Oh, and the addition is going to be that you can specify a field for the module so that you can enter a customised message for a given news item/article/whatever to accompany the title and link in the twitter post on a per-page basis rather than the blanket default message in the current version - though it'll fall back to the default message if no custom message is selected. Getting complicated, but very configurable
  7. What selector string should I use to return pages that have a specific page selected in a Page Fieldtype input? I searched around and tried multiple things, but couldn't find the answer. I really figured this should be easy, so I may totally be overlooking something. I have pages that can have any number of tags selected (through a Page Fieldtype input). I would like to return a PageArray of pages that have the "Featured" tag selected. (It doesn't have to be the ONLY tag selected.) I attempt to do that with the following code, but it is returning all the pages. $featuredTag = $pages->get('template=tag, title=Featured'); $featuredPages = $page->children("tags=$featuredTag"); Any idea what I'm doing wrong? Am I totally missing something? (A little more info, I am using checkboxes to select the tags in the Page Fieldtype input.)
  8. Hi, This might be a dumb question, but my jquery skills are still somewhere below zero. I do have the following jquery code in my external .js file. And it works fine, but, for maintenance and reusebility reasons, I don't like having the target url hard coded in the .js file. But I assume it isn't possible to pass the PW api $config->urls->root to this external .js file, would it? /*Make header div clickable*/ $(document).ready(function() { $('#header').click(function(){ window.location = 'http://www.mysite.com/'; }); $('#search_form').click(function(event){ event.stopPropagation(); }); }); /*End header div*/ /Jasper
  9. 1. Am new to PW and this forum so I'd like to say: Hello to everyone 2. PW is great 3. Got a problem with navigation, I think it should be simple but my brain stopped working here is the situation: Home --EN ----ABOUT ----OFFER ------PRODUCT1 ------PRODUCT2 --DE --FR etc. What I want to accomplish is to get class="on" added to OFFER when I am on PRODUCT page. Easy to get this done if not using EN, FR pages. Am not using translation functions from PW, languages EN, FR are just a pages. <!--?php $lang = $page--->rootParent->name; $homepage = $pages->get("/".$lang); echo "
  10. I have a selector that uses the page ID to narrow down items by a page field. Basically $pages->find("organization={$page->id}"); However, it doesn't work with one page, because it lacks an ID--how is this possible? What can I do to fix it? Thanks. This is in PW 2.2.0.1.
  11. Hi ProcessWire'ers, I'm a total newb, reading through the docs to try and get up to speed with PW. I read here that: But if I visit Admin > setup > templates then Edit > Advanced, I see no reference to URL Segments. Any comments on why would be most appreciated, cheers, -Alan
  12. Hi, I am trying to find the url of some pages, I have the page ID so I figured that something like this should work. $linkurl = wire('pages')->get(1187)->url ... do something ... $linkurl = wire('pages')->get(1186)->url ... do something ... $linkurl = wire('pages')->get(1093)->url ... do something ... $linkurl = wire('pages')->get(1097)->url ... do something ... But whatever I try I get the root url as $linkurl. I even tried it with ->title, just to see what happened. Every time I got the title of the homepage. Am I doing something wrong or is wire('pages')->get(id) not working? I use the latest commit. //Jasper
  13. When a new field created, if hit save without selecting a fieldtype it throws an white page error. Fatal error: Call to a member function attr() on a non-object in /Applications/XAMPP/xamppfiles/htdocs/pw-dev/wire/modules/Process/ProcessField/ProcessField.module on line 636 This error message was shown because site is in debug mode ($config->debug = true; in /site/config.php). Error has been logged.
  14. 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
  15. Once again, I got a problem with a hosting where I can't upload images/files. It just uploads to 100% then the bar disappears and it's like before. In the post I see this message: error: false message: "Page not saved (no changes)" Filepermission seems ok. Install went normal. Any ideas what to look for? I can provide phpinfo if needed. PHP version is: PHP/5.2.4-2ubuntu5.23
  16. What is the best way to add an image to one of my navigation links? I would like to add an image tag right before my homepage link, within the anchor tags. Starting from the default navigation code: $homepage = $pages->get("/"); $children = $homepage->children; $children->prepend($homepage); foreach($children as $child) { $class = $child === $page->rootParent ? " class='on'" : ''; echo "<li><a$class href='{$child->url}'>{$child->title}</a></li>"; } I tried editing the $homepage variable to concatenate an image tag before $pages->get("/"); but that threw an error since (I'm guessing) the prepend() method is specific about the kind of input it will take in its parameter. I'm probably going about this all wrong. Any help would be greatly appreciated.
  17. 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?
  18. 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.
  19. I'm using the in-context editing menubar plug-in, and to avoid confusing my clients, I'd like to be able to remove the little edit button that shows up in the corner of front-end pages by default. What's the best way to go about doing this?
  20. 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?
  21. 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!
  22. 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
  23. 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
  24. 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?
  25. It would be great if there would be an easy way to add flash-type of session variables. Here is citation from codeigniter docs:
×
×
  • Create New...