Jump to content

buothz

Members
  • Posts

    50
  • Joined

  • Last visited

Everything posted by buothz

  1. Hi, after an image upload my processwire site http://www.cosascegli.it go to refresh... i've tried to enter with http://www.cosascegli.it/processwire/ with my pc with 4 browsers and with another pc but don't go!!! I'm sure 100% that user and password are ok... what is the problem? I don't have message on screen about the login, only a fast refresh... Can be a problem with the session/cache? I've see database and i haven't see problems... now there are a lot of problems in the site, specially in the language system...
  2. yes, is a low cost server... thank u for help but also with your code don't translate NAV
  3. thank u but where did u see it? browser? chrome console?
  4. only alert "Strict Standards: Declaration of Pdfcomposer::___execute() should be compatible with that of Process::___execute() in /home/mhd-01/www.cosascegli.it/htdocs/site/modules/Pdfcomposer.module on line 3 because i don't use it... i've always problem of the nav language...
  5. FOUND THE PROBLEM! if ($session->language == 'it') { echo '<li><a href="./?language=en"><img src="/img/gb.png" alt="English Language"></a></li>'; $language = $languages->get("it"); } else { echo '<li><a href="./?language=it"><img src="/img/it.png" alt="Italian Language"></a></li>'; } system loose "$language = $languages->get("it");" i've put it on the head.inc for all the pages... but the problem of the only eng nav? Some one can help me?
  6. no :'( because if I visit http://www.cosascegl...acht/azimut-75/ eng Hull Construction: Fiberglass hull, teak deck and cockpit. Flybridge with teak walkways now i click the italian's flag http://www.cosascegl...75/?language=it Materiale Scafo: Vetroresina, ponte e pozzetto in teak. Camminamenti del flybridge in teak now i refresh (i loose ?language=it but session lang = it) http://www.cosascegl...acht/azimut-75/ Hull Construction: Vetroresina, ponte e pozzetto in teak. Camminamenti del flybridge in teak Hull Construction is not italian label! Italian label is "Materiale Scafo"... where is the problem? Thank u...
  7. thank u for the response but i can't solve my problem... If i visit my site with the end of the url http://www.xxx.it/?language=it i see the right language field, but I u use the session i'll see the english. code // LANGUAGES if($input->get->language) { // user clicked on a link to set the language $name = $sanitizer->pageName($input->get->language); $language = $languages->get($name); if($language) $session->language = $language->name; } if($session->language) { // language is defined in user's session $user->language = $languages->get($session->language); } $field = $fields->get('anno'); $label = $field->get("label$language"); echo "<li><strong>$label:</strong> $s->anno</li>"; $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>"; } //fine foreach iniziale if ($session->language == 'it') { echo '<li><a href="./?language=en"><img src="/img/gb.png" alt="English Language"></a></li>'; } else { echo '<li><a href="./?language=it"><img src="/img/it.png" alt="Italian Language"></a></li>'; } try http://www.cosascegl...acht/azimut-75/ (default language it) http://www.cosascegl...75/?language=it $session don't record the selected choice? How what i can do? Problem is ONLY for NAV and LABEL thank u...
  8. I have a problem with the language system: 1) I have two languages​​, "Default" and my own "it". What I can do to set "It" as default? 2) For the label, system give text of the label in English only ... how can I do to get the translated one when i click italian flag? Site is: http://www.cosascegli.it try for example an yacht page, if you need I'll post the code now that I'm at work ... Thank u in advance.
  9. i've used this code //menu con pagine fino a terzo figlio $yc = $pages->get("/yachts/"); $children = $yc->children; $childchildren = $child->children; //$children->prepend($yc); mi restituisce yacht echo '<ul>'; foreach($children as $child) { $child === $page->rootParent; //=== identico, == equal echo "<li><a href='{$child->url}'>{$child->title}</a></li><ul>"; foreach($child->children as $schild) { echo "<li><a href='{$schild->url}'>{$schild->title}</a></li>"; } echo '</ul></li>'; } echo '</ul>'; //fine menu fino a terzo figlio
  10. give me error "Parse Error syntax error, unexpected ')' (line 224 of /home/mhd-01/www.cosascegli.it/htdocs/site/templates/head.inc) This error message was shown because you are logged in as a Superuser. Error has been logged."
  11. thank u a lot.. tomorrow i'll try the code... I thought there was another method using the Processwire API
  12. I'm creating a menu for a site, I need to take pages url and title as follows STUDENTS MALE PETER JACOB ALDO FEMALE ANNA FRANCESCA I need to take up the third child 1st node STUDENTS 2nd node MALE/FEMALE 3rd node PETER/JACOB... if u use this code $sc = $pages->get("/students/"); $children = $sc->children; echo '<ul>'; foreach($children as $child) { $child === $page->rootParent; echo "<li><a href='{$child->url}'>{$child->title}</a></li>"; } echo '</ul>'; I obtain MALE/FEMALE, how I can take PETER/JACOB and others??? thank u
  13. Thanks for the reply, I too thought the problem of the admin ... With regard to the develop I thought to do so in two ways (tell me what you think you have much experience) 1) use the UI "www.nomesito.com / processwire" and use the "repeaterFieldType" to add appetizers, first, second, and desserts so that the user can enter the desired number of courses which will be composed by category (starter,...), name plate, image, description and price 1b) using php code to add a shopping cart system (you can recommend one free and open source cart system?) 1c) I should find a way to do view the ONLY page of the owner of the restaurants... is there a way? 2) via the API would create an admin page for each user where is created the content 2a) I should implement the creations of fields (to add plates in category) $template = $templates->get("restaurant_template"); $template->fields->add("new_plate"); $template->fields->save(); and I must add category and others field to the plate... In this case, how can I recreate the "repeater" system using api? If I'll posting the code that I create is a problem? Could be born a module?
  14. Hi, I would like to create a portal like this http://www.vousavezchoisi.com/ that manages a single page for each restaurant (with address, map, etc.) and then the restaurant has a page from admin can: - Enter the menu divided into categories (appetizers, first, second ...) - Any restaurant can receive the items in your basket (food) via email Processwire is okay to create a site like this? Thanks
  15. lol! I'm an idiot! I've put only ​​one because I had only 2 items in that category..
  16. I can not understand why in this case $yachts = $pages->find("template=newyachts, limit=3, sort=date"); foreach($yachts as $s) { ... } $pagination = $yachts->renderPager(); echo $pagination; Pagination works well... In this case $yachts = $pages->get("$page->path")->find("template=newyachts, limit=1, sort=date"); foreach($yachts as $s) { ... } $pagination = $yachts->renderPager(); echo $pagination; don't work... In both cases, I have activated the url -> allow pages where is the mistake? Thank you.
  17. for example i've created related pages for a category, the lenght of a yacht echo '<h3>Yachts Simili</h3>'; //correlati lunghezza $lun = $page->lunghezza; $lunp = $lun+10; $lunm = $lun-10; $yachts = $pages->find('lunghezza>' . $lunm . ',lunghezza<' . $lunp . ', limit=3, sort=lunghezza');
  18. thanks for all the answers, then as soon as I will post the code here also to helppeople who want to get my same results
  19. I would like to sort the results page with - The last 3 inserted pages - The most visited pages for the last three pages inserted I used the following code $yachts = $pages->find("template=newyachts, limit=3, sort=-date"); foreach($yachts as $s) {... The problem is that do not sort them by date... I do not know if you need to add a field "date", or it is generated automatically (as I thought I had read in the API). Instead to select the most visited pages is there a way? Thanks a lot...
  20. Thank you so much for your prompt reply, I just want to take the field and divide them into categories, so I decided to use the fieldset to preserve the multi-language. For example: http://www.yachtbrok.../barca37016.htm "specifiche" in English must be specific. But if I use an editable field risk being edited by the user should not edit it instead ... To have an ordered structure wanted to use the possibility of fieldset ... Otherwise I can use simple PHP like IF or SWITCH if ($_GET['language']=='it') { echo 'specifiche'; } else { echo 'specifics'; } thanks again
  21. thank u another little question, to show "FieldsetOpen" and "FieldsetOpenTab" with API?
  22. Hi, i've this field: NAME LABEL TYPE NOTES TEMPLATES bandiera Flag TextLanguage 1 I also did a search on the forum and the API section but could not find answer, is I use echo $page->bandiera; I will only output the value (italia for example), I would rather have as output LABEL: VALUE (Flag: Italia for example) thank u...
×
×
  • Create New...