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. Before i report a bug on Github i want to ask if there are more people that are experiencing problems with the search feature in the admin. Scenario: A fresh install of PW. Search for 'templates'-> Found 1 page using selector: title~=templates Search for 'about'-> Found 0 pages using selector: title~=about Search for 'about'-> Found 1 page using selector: title=about Search for 'site map'-> Found 0 pages using selector: title~=site map Search for 'site map'-> Found 1 page using selector: title=site map Search for 'site'->Found 1 page using selector: title~=site (the page with title "Site Map") Maybe i'm confused about the different types of search but if the templates page is found, the about page should also be found? Also the above sitemap search doesn't seem logical in result.
  2. I have multiple sites setup using Apache VirtualHosts like this: /var/www/html/vhost1 /var/www/html/vhost2 ... These sites are all different purposes but same owner. They maybe could share templates and styles. When I look at the zipfile or the tarball it has a top level directory of: ryancramerdesign-ProcessWire-1d2b19e/... Do I keep this top level directory or do I just extract everything under it into my existing vhostX directories? So where should I install processwire to begin using it?
  3. I have a small search form that searches products by selected manufacturer, price or manufacturer and price combined. Manufacturer is a page list field, and the generated prices are a range. This is the form: <label for="search-manufacturer">Manufacturer</label> <select id="search-manufacturer" name="manufacturer"> <option value="">Any</option> <!--?php foreach($pages--->get("/manufacturer/")->children() as $manufacturer) { $selected = $manufacturer->name == $input->whitelist->manufacturer ? " selected='selected' " : ''; echo "{$manufacturer->title}"; } ?> </select> <label for="search-price">Price</label> <select id="search-price" name="price"> <option value="">Any</option> <!--?php foreach(array('0-50', '50-250', '250-500', '500-750', '750-1000', '1000+') as $price) { $selected = $price == $input--->whitelist->price ? " selected='selected'" : ''; echo "$price"; } ?> </select> <input type="submit" id="search-submit" name="submit" value="Search"> What code do I need to put into "manufacturer-search" template to search products by criterions mentioned above? I've looked into the skyscapers profile but couldn't make it work... Thanks
  4. Hi all, I've been developing a small site using PW 2.2 on my dev account at phpfog and things have been going pretty smooth. So comes the time to move the site to production (running PHP 5.2.17, safe_mode off, PW debug set to true) and I've been unable to upload new images ever since. The site/assets folder is writable (also set permissions of all folder in it to 777 just in case). When I create a new page and try to upload a new image, the upload process doesn't start (nothing happens) but the file size is shown and the page's folder is created under assets/files. Upon inspection using Firebug's console I get a 403 Forbidden for the Ajax uploader's POST response: <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN"> <html><head> <title>403 Forbidden</title> </head><body> <h1>Forbidden</h1> <p>You don't have permission to access /beta/processwire/page/edit/ on this server.</p> <p>Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.</p> </body></html> Checking phpinfo I found that that the upload_tmp_dir variable is not set (no value) so I tried overriding it in config.php as outlined in this thread. Still no luck. I dumped the site to my computer and upload works fine. Anybody have an idea what I'm doing wrong? Thanks!
  5. Hi.. Im trying to get ProcessWire up and running, but I keep running into a wall. I configured the Lion server so it handles .htaccess files, and checked if mod_rewrite is there. Im running the installing process og ProcessWire perfectly, but when It comes to the live site and admin part. I keep getting: 404 Not Found from the server.. I think its something with the url rewrite that goes wrong.. I would we happy if some one can point me to a solution, because I really like to try ProcessWire.. (Getting tired og WordPress and Joomla.) Thanks in advance.. Bjørn Christiansen aka ChrisB
  6. Hi everyone, I have an existing PW site that has a news section and it's getting quite big. I'd like some pointers as to how to go about listing the entries: 1. by month for the current year and 2. by year for each year past eg 2011, 2010 etc. All the posts have date fields too if that makes it easier. Any help would be great. Thanks Marty
  7. I have an area of content 'Upcoming Events' which has title, text, image etc.. I want to be able to make visible on a page and then sometimes remove it. At the moment I can unpublish an 'Upcoming Events' page and that content is removed from the page where I display it, but i still have a bunch of empty HTML tags left over. What is the best way to have an area of content turn 'off' without leaving any trace?
  8. I just installed processwire and seemingly I am not able to find where the admin is. I tried /admin , /administrator. I even couldn't find where in the config this is to be set or found neither a login link on the default template.
  9. Hey guys, I've got a question about setting the body and headline field from the template. I've noticed when I set one of these fields and save the page, it doesn't actually save the value I set it to. Here's the code I'm using to set a headline: $website = $pages->get("user={$user}, path=/websites/"); $website->setOutputFormatting(false); if(!$input->post->headline) { $error .= "Please add your Headline. "; } else { $website->headine = $input->post->headline; } $website->save(); Is there something special I need to do to set this field?
  10. Hello to all of you, I'm new to Processwire and I've been trying desperately for a few hours to just... install it on my localhost (Ubuntu 12.04, Apache 2.2.22). You'll soon find out that I am not a professionel web developper, but still... this is driving me crazy and I'd love to get some help. To describe my problem briefly : installation goes fine, no problem. I set everything as asked during the process (writable directories and so on). Then I go to 'View my site' : just fine. And as soon as I hit ANY link on the Basic homepage, I get that 404 error quite a few talked about in other posts... So far, I've tested : - nonsens string in my .htaccess : throws a 500 error (sound good, no?) - re-read everything in my Apache setting (again I'm no professional and couldn't find anything wrong...) - checked the mod_rewrite in my phpinfo... Looks good. I'll put it underneath for those interested to help. - tried to uncomment the rewriteBase rule in the .htaccess. Nothing worked (actually, and that's CRAZY to me, it worked once on a reload (I DID see the ABOUT page simply putting for the nth time RewriteBase /mysubdir/, but it worked ONCE (can you believe this?) and never again. - tried restarting my Apache server many times... no change.... I can't think of anything else to do, so please, if someone can help, I'd greatly appreciate... Thanks in advance for your help and time. My phpinfo is attached.phpinfo.php.html Celfred. EDIT : Oh I'm SO sorry and ashamed... (Did I tell you I was no professional?) I had just one last idea before going to bed... trying one last change on my rewriteBase line and... It worked ! It's cool, but I can't believe it took me hours to find this out. Actually my server is installation is in private/processwire/ subfolder and I simply forgot the 'private' part in the path... I guess you can ignore my post now... Have a good night...
  11. Shouldn't a module add a .css or .js named same as the module automaticly? It strikes me again, that I added a ModuleName.css to the module folder assuming it get's added automaticly, but it does not. Not first time I struggle with something that should be simple. Edit: The module is autoload and is extends WireData implements Module. (of course in the admin, not frontend. In case anyone wondering)
  12. Hi, I am a newbie to programming and I am developing this site for a client of mine(WIP) : http://greenpantry.in/test820fcec/ It is a single page site, where the content is divided into sections. I want to know if it would be feasible to use Processwire to manage the content of the site. From what I have read, processwire's templating system is based on pages. I want to know if the client will be able to edit each section individually from the admin panel, as I feel creating a single long template for the page will be kind of messy. 'our platters' and 'gallery' are the two sections they want to be able to update. Btw PW looks so fresh and this is probably a trivial thing to execute. I just wanted to be sure it was possible before i dive in. If this is possible, any pointers as to where I can start will also be very helpful as I am just now beginning to go through the docs/videos. Thank you!
  13. Hello! Just discovered PW a few days ago and I think it's an amazing CMS. TRying to get my head arround the plugins/ modules and I was wondering if anyone can explain me how to use the Wire Tabs plugin. I want to have tabed content in one of my templates, 3 tabs to more specific, each tab containing textarea fields. I managed to create the fields, but I need help to display it in tabs. Will it be possible to have the same fields displayed in tabs in the admin, for editing also? Thanks in advance! Norboo //Edit: adamkiss Moved from 'Modules & Plugins' forum, because this more of a General support thing
  14. Hi guys, have been having an issue with pagination. It's a bit odd, I have it working fine as per Ryan's docs but when I get to a page2 of results, my categories don't display. I should add that my categories are generated at the top of the page in their own loop. The template also uses urlSegment to filter the results by category. I have added pagination to both the news template and also the categories template which get's called through urlSegment. On the main news page, pagination works but the categories come up empty when on the 2nd page. On the categories template, the pagination won't show at all, and I'm not sure why as it's pretty much an identical setup to the news template. Here's all the code, in case any of you can make sense of it.... Thanks. News index : <?php include("./header.inc"); ?> <div id="news_index" class="grey_gradient"> <?php if ($input->urlSegment1 !="") { include ("./categories.php"); } else { ?> <div id="news_top_bar"> <h5 id="news_header">Recent news items</h5> <?php $news_cats = $pages->find("template=news_category"); if ($news_cats) { ?> <ul id="news_cats"> <li>By category: </li> <?php foreach ($news_cats as $cat) { $numArticles = $pages->count("template=news_entry, news_category_link=$cat"); if ($numArticles > 0) { ?> <li><a href="<?php echo $page->url . $cat->name; ?>"><?php echo $cat->title; ?></a> / </li> <?php } ?> <?php } ?> </ul> <?php } ?> <div class="clear"></div><!-- /.clear --> </div><!-- /#news_top_bar --> <?php $news = $page->children("sort=-created, limit=3"); foreach ($news as $entry) { $class = "news_box"; if ($entry == $news->last()) { $class .= " news_box_last"; } ?> <div class="<?php echo $class; ?>"> <div class="news_index_text"> <h3><a href="<?php echo $entry->url; ?>"><?php echo $entry->title; ?></a></h3> <h6><?php echo $entry->entry_date; ?> by <?php echo $entry->createdUser->first_name . " " . $entry->createdUser->last_name; ?></h6> <?php if ($entry->summary) { echo "<p>" . $entry->summary . "</p>"; } else { $body_text = strip_tags($entry->body); $text = substr($body_text, 0, 300); echo "<p>$text...</p>"; } ?> <a href="<?php echo $entry->url; ?>" class="button">Read on</a> </div><!-- /.news_index_text --> <?php if ($entry->main_image) { $news_image = $entry->main_image->size(240,180); ?> <img src="<?php echo $news_image->url; ?>" width="<?php echo $news_image->width; ?>" height="<?php echo $news_image->height; ?>" alt="<?php echo $entry->title; ?>" class="small_frame" /> <?php } ?> <div class="clear"></div><!-- /.clear --> </div><!-- /.news_box --> <?php } ?> <?php // PAGINATION LINKS $pagination = $news->renderPager(); echo $pagination; ?> <?php } ?> </div><!-- /#news_index --> <?php include("./footer.inc"); ?> Categories.php : <?php $name = $sanitizer->pageName($input->urlSegment1); $category = $pages->find("template=news_category, name=$name"); $news_cats = $pages->find("template=news_category"); ?> <div id="news_top_bar"> <h5 id="news_header">Recent news items - <?php echo ucwords($name); ?></h5> <?php if ($news_cats) { ?> <ul id="news_cats"> <li>By category: </li> <?php foreach ($news_cats as $cat) { $numArticles = $pages->count("template=news_entry, news_category_link=$cat"); if ($numArticles > 0) { ?> <li><a href="<?php echo $page->url . $cat->name; ?>"><?php echo $cat->title; ?></a> / </li> <?php } ?> <?php } ?> </ul> <?php } ?> <div class="clear"></div><!-- /.clear --> </div><!-- /#news_top_bar --> <?php $news = $pages->find("template=news_entry, news_category_link=$category, limit=1"); foreach ($news as $entry) { $class = "news_box"; if ($entry == $news->last()) { $class .= " news_box_last"; } ?> <div class="<?php echo $class; ?>"> <div class="news_index_text"> <h3><a href="<?php echo $entry->url; ?>"><?php echo $entry->title; ?></a></h3> <h6><?php echo $entry->entry_date; ?> by <?php echo $entry->createdUser->first_name . " " . $entry->createdUser->last_name; ?></h6> <?php if ($entry->summary) { echo "<p>" . $entry->summary . "</p>"; } else { $body_text = strip_tags($entry->body); $text = substr($body_text, 0, 300); echo "<p>$text...</p>"; } ?> <a href="<?php echo $entry->url; ?>" class="button">Read on</a> </div><!-- /.news_index_text --> <?php if ($entry->main_image) { $news_image = $entry->main_image->size(240,180); ?> <img src="<?php echo $news_image->url; ?>" width="<?php echo $news_image->width; ?>" height="<?php echo $news_image->height; ?>" alt="<?php echo $entry->title; ?>" class="small_frame" /> <?php } ?> <div class="clear"></div><!-- /.clear --> </div><!-- /.news_box --> <?php } ?> <?php // PAGINATION LINKS $pagination = $news->renderPager(); echo $pagination; ?> I've just re-read part of the pagination docs here and have added "start=0, limit=n" to my news_index template so now categories are showing even on 2nd page. Still can't seem to get pagination showing on categories template though
  15. How do I go about adding the process field to a new template? I created a new template and placed it under the admin page (I also set it to use the admin template) - however, I don't see the "process" field as an option to be added to it. Thanks in advance for any pointers! Edit: To clarify, I assigned "admin" as the alternative template filename for this new template because I need to add other fields to it.
  16. 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
  17. 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.
  18. 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
  19. 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()?
  20. 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?
  21. 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
  22. 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.)
  23. 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
  24. 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 "
  25. 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.
×
×
  • Create New...