Jump to content

Guy Verville

Members
  • Posts

    204
  • Joined

  • Last visited

Posts posted by Guy Verville

  1. And this image field does not appear to be sizable by the ->size method... I get this error:

    2014-03-09 12:33:24    admin    http://dev.creacc.org/    Error:     Exception: Method Pageimages::size does not exist or is not callable in this context (in /home/creaccor/public_html/dev/wire/core/Wire.php line 320)  #0 /home/creaccor/public_html/dev/site/templates/accueil.php(16): Wire->__call('size', Array) #1 /home/creaccor/public_html/dev/site/templates/accueil.php(16): Pageimages->size('140px', '85px') #2 /home/creaccor/public_html/dev/wire/core/TemplateFile.php(140): require('/home/creaccor/...') #3 [internal function]: TemplateFile->___render() #4 /home/creaccor/public_html/dev/wire/core/Wire.php(359): call_user_func_array(Array, Array) #5 /home/creaccor/public_html/dev/wire/core/Wire.php(317): Wire->runHooks('render', Array) #6 /home/creaccor/public_html/dev/wire/modules/PageRender.module(337): Wire->__call('render', Array) #7 /home/creaccor/public_html/dev/wire/modules/PageRender.module(337): TemplateFile->render() #8 [internal function]: PageRender->___renderPage(Object(HookEvent)) #9 /home/creaccor/public_html/dev/wire/core/Wire.php(359): call_user_func_array(Arra
    
     
    This is restricted to one occurrence, but I did try to set no limit. Same problem.  The code is simple, and works with the regular image.
     
    			$lesVedettes = $pages->find('vedette=1'); 
    			$itemVedette = 0;
    			$miniatures = '<div id="lesMiniatures" class="grid-35 mobile-grid-100 tablet-grid-35"><ul class="ui-tabs-nav">';
    			$photos = '<div id="lesPhotos" class="grid-65 mobile-grid-100 tablet-grid-65">';
    			foreach ($lesVedettes as $vedette){ 
    					$itemVedette++;
    				  $miniatures .= '<li class="ui-tabs-nav-item" id="nav-fragment-'.strval($itemVedette).'">';
    					$miniatures .= '<a href="#fragment-'.$itemVedette .'">';
    					$miniatures .= retournerImage($vedette->imagevedette->size('140px','85px')->url);
    
    
  2. I have set an image field to appear only if another field is checked. This works perfectly. However, when I try to upload an image into that field (image type), nothing happens. There is already another image field in the template. 

    I click the field Vedette

    post-1691-0-85041900-1394379299_thumb.pn
    The image field appears.
    post-1691-0-82044600-1394379298_thumb.pn
    I select a file. There is no restriction for the size but it is very small.
    post-1691-0-33104700-1394379298_thumb.pn
    Processwire seems to process the file.
    post-1691-0-34141500-1394379297_thumb.pn
    Then nada...
    post-1691-0-24091400-1394379296_thumb.pn

    I did try to upload the same file in the regular image field, and it works perfectly.

    Any idea?

    post-1691-0-24091400-1394379296_thumb.pn

    post-1691-0-34141500-1394379297_thumb.pn

    post-1691-0-33104700-1394379298_thumb.pn

    post-1691-0-82044600-1394379298_thumb.pn

    post-1691-0-85041900-1394379299_thumb.pn

  3. Hi,

    I'm testing the RSS Feed generator module. I'm not sure if I'm doing things correctly.

    I have placed the code below in a template.

    
    		$rss = $modules->get("MarkupRSS");
    		$rss->title = "Fil RSS";
    		$rss->description = "Les plus récentes mises à jour sur le site du CREACC";
    		$items = $pages->find("limit=10, sort=-created");
    		$rss->render($items); 
    
    

    Then I created a page from that template. The result is here.

    The error given:

    This page contains the following errors:
    error on line 6 at column 15: Encoding error
    Below is a rendering of the page up to the first error.

    What can it be?

  4. http://creacc.espaceproduction.com/

    This is a site in its infancy. The code for the search engine is the original one with one exception: i have renamed search.php to recherche.php

    So the form in the head is:

    <form id='search_form' action='<?php echo $config->urls->root?>rechercher/' method='get'>
    <input type='text' name='q' id='search_query' value='<?php echo htmlentities($input->whitelist('q'), ENT_QUOTES, 'UTF-8'); ?>' />
    <button type='submit' id='search_submit'>Rechercher</button>
    </form>
    

    and the code in the recherche.php is:

    <?php
    $out = '';
    if($q = $sanitizer->selectorValue($input->get->q)) {
    	$input->whitelist('q', $q); 
    	$matches = $pages->find("title|body|corps~=$q, limit=50"); 
    	$count = count($matches); 
    
    	if($count) {
    		if ($count==1){$s='';}else{$s='s';}
    		$out .= '<h2>Résultat : $count page'.$s.'</h2><ul class="nav">';
    		foreach($matches as $m) {
    			$out .= "<li><p><a href='{$m->url}'>{$m->title}</a><br />{$m->summary}</p></li>";
    		}
    		$out .= '</ul>';
    
    	} else {
    		$out .= '<h2>Recherche infructueuse</h2>';
    	}
    } else {
    	$out .= '<h2>Que cherchez-vous ?</h2>';
    }
    
    include("./elements/entete.inc");
    echo $out;
    include("./elements/pied.inc");
    

    Search, for example, Montréal. Nothing is passed, nothing happens.

  5. It is probably something quite easy to solve, but I can't figure where. I have begun a simple site. Each page has some screen captures inserted in the body field.

    On my local machine, everything is fine (http://localhost).

    I uploaded the entire site, migrated the database, the site resides under a two levels deep directory: http://adomain.com/sites/manuel

    Every image has an alleged broken link, the source reads like this <img src="/site/assets/files/1011/goog....

    post-1691-0-84626700-1379508967_thumb.pn

    The images field is correct, in edit mode, but still no correct display.

    post-1691-0-51078800-1379509044_thumb.pn

    Editing the image show it correctly!

    post-1691-0-09983500-1379509115_thumb.pn

    Saving gives this error:

    post-1691-0-95375700-1379509148_thumb.pn

    But the page now looks perfect because the linked has been correctly written:

    <img src="/sites/manuel/site/assets/files/1011/goog....

    I have tried rewriting the base in htaccess in this fashion, but to no avail.

    RewriteBase /sites/manuel/

    The root site is made with Drupal. This minisite, inside the directories, is for a technical manual.

    How do I solve this?

    Thank you in advance.

  6. http://familleverville.org

    A new website made with PW. ProCache has been installed and it works like a charm. The site was previously built in Flash, so I kept the overall structure. This photo album stops at 2007, because the previous site was a built specially for the 50th wedding anniversary of my parents. It will be completed soon.

    Nothing fancy. Three level of pages, three templates. One extra field. Five sections which can be translated as: Ancestors, Jacques and Irène, The years, Anniversaries, Photo Index.

    Every photo has been tagged so they can populate the Photo Index section. 

    My mother has her own website (http://irenegiguere.com), made also with PW. She is 75 and has adopted quite easily the CMS. She is eager to begin working the new site, along my sisters who are thrilled to help.

    Congratulations, Ryan, you've conceived a really great tool!

    post-1691-0-66044100-1377277180_thumb.pn

    • Like 7
  7. I am preparing a new site for my familly which will replace the existing one made in Flash (www.familleverville.org).

    While the sitemap will be quite straightforward (ancestors, father, mother, children, grandchildren), I am wondering what is the best solution to allow users to filter photos according to date (year only) or tags (all photos relevant to a child (including those found elsewhere is a site, etc.)

    I understand that I can add pages, create fields, put tags on photos. The ideal solution, I think, would to be able to tag with checked boxes (to allow quick tagging). The tags being the pages (these pages would be created according to the name of children, grand-children, the parent pages and so forth). There would be also a field associated with dates. Users (my familly) would have then the leisure to create a page, put, say 10 photos of an event, and select the appropriate tags.

    Then, it would be possible to have in the left menu some filtering options according to date or a search field.

    Is this sounds too complex? I am curious to know how you would manage to do it. 

    The front page (not yet clearly designed)

    post-1691-0-67245100-1376493528_thumb.jp

    The other pages

    post-1691-0-18724700-1376493537_thumb.jp

  8. Hello Ryan,

    First of all, my two thumbs up for PW. It is a great piece of work!  I don't agree with the problem of broken links. Having a file system of its own, Concrete5 doesn't create that situation since a file has always one and only reference, whatever name it has (and whatever it is an image or a file). The file has not to be placed in the file system either. The CMS places it there automatically. If a user want to replace such and such, he/she only goes to the file system, or from the place it has put it) and change it. Every reference in the site will be automatically changed, even if he/she has placed it in a text area (the link is not a direct call to that file, but rather to its reference, the user doesn't see this technicality unless he/she open the html view (<a href="/index.php/download_file/view/494/"> <--this suggest a dynamic call to it, if I am correct).

    The solution in PW is to place the file on its own page, so the user can easily retrace it, delete the previous link, etc. Then, the reference is kept elsewhere. I am ok with that solution. But I don't see where a replace button can not fit that situation. The file has a reference, no? But you created the beast. Perhaps I just don't get it ^_^

    Have a nice day.

  9. This is my first attempt with Processwire. I must say that I am impressed with this CMS. I know Drupal, Wordpress, Liferay, Concrete5, and so far, PW would be certainly on top of the list now (perhaps at the same level as Concrete5).

    My mother had made her own website with FrontPage. So all photos are from her, and I did only structure it with Processwire. The site use basically four templates. 1) Front  2) Front-mosaic 3) Mosaic, and 4) Basic (used in the timeline).  

    The site is not finished. It was done in 20 hours (5 hours for the design process, 5 hours structuring the site, 10 hours creating pages and dumping the photos (there are a lot!).

    http://irenegiguere.com

    • Like 11
  10. Hello Macrura,

    I understand your points, but, for me, this is killing the beautiful way PW is working for inserting files. I am disciplined enough to rename a file exactly like the precedent one, but this would not be necessarily the case with future clients and (sometimes) dumb employees. Also, file names have to changed in certain cases (for organizational purposes, for example).

    Why a new method called replace seems out of reach? I wonder. PW is all about elegant simplicity. Clients are not geeks, and they want simplicity too. Anyway, what you suggest are good workarounds, but there are just that, workarounds, and I hope they are temporary ones.

    This has to be taken into account when proposing a CMS (PW for the joy of toying with it, Concrete5 for the real liberty it gives to the client?). We'll see. But PW is certainly now, for me, a good choice for future projects.

  11. Hi, thank your for your answer. Companies sites are often document centric, so it is important to have a good asset manager. Perhaps PW is just not the best solution for that type of website. I'm puzzled why, if there are add, and delete methods, there is no replace one.  I am no PHP or jQuery guru, and certainly not a PW module shaman, but it seems to be a simple trick to do.

    The image or file has a its reference. Click the replace button, a dialog appears to ask for the new file, and voilà. No need to have page for every file (which is a real PITA).

    My two cents, for what it is worth ;-)

  12. I am so far impressed by Processwire and still learning it (well, it is so easy!). I will certainly propose this CMS to my future clients. One thing is puzzling me, though, is file references. I have numerous clients who make references throughout their pages.

    Say, for example, that a PDF or an image is found in three pages. In Concrete5, since there is a file manager, it is easy to replace a file without losing the reference to it, because there is a replace command. Then, you are sure that at all the references of that file has not changed throughout the site.

    I don't see this in Processwire. I understand that I can reference a file coming from another page. But to just replace it (for example, the document has to be updated because of a typo), the only solution I see is to go to the asset directory and change the document there. This is not very user friendly for a regular user.

    Perhaps an example would be more clear. I am making a gardening site. Each page can contain 20 photos of flowers, which are tagged and documented. Then, somewhere else, a reference may be made to one photo specific photo.

    Now, that photo, which is included in a list of twenty other ones, has to be updated. I could delete the file, upload another one and rewrite the information. But the reference is now lost where the other image is cited. Right?

    • Like 1
×
×
  • Create New...