Jump to content

alejandro

Members
  • Content Count

    90
  • Joined

  • Last visited

Everything posted by alejandro

  1. Hello, if I have an options field type: $field->months And I need to push several new items like: for ($i=0; $i < (date("n")); $i++) { $field->months->push($i); // or $field->months->and($i); } But all of this returns an error "... not an allowed type..". As i understand an options field type is a WireArray so it should support such methods? Thanks, Alejandro.
  2. Thanks Jan. I'm using your first solution, as is enough for what I need. Thank you very much.
  3. Hello, a page with url "site/teachers" shows the layout: | main section | aside | "main" shows a list of teachers, and when clicked in one teacher its info is loaded in "aside" via ajax. Now I want to use URL segments in page "teachers" to display a teacher info in "aside" when URL = "site/teachers/teacher1" But when url "site/teachers/teacher1" is entered browser gets directed to "teacher1" page itself (and causes a mess because is loaded in main not aside...) instead of "teachers" page plus url segment and teacher info in aside. In page "teachers" i use the code: foreach ($page->children as $c) { if($input->urlSegment1 == '{$c->name}') { $page->aside .= "... page content..."; } } First time using url segments, so I think i dont understand how to make it work properly. I hope I explained the problem more or less understandable. Thanks in advance, Alejandro.
  4. Well it seems than modern browsers handle at leat 6 connections per hostname: http://www.browserscope.org/?category=network&v=top So latency becomes less important: 120 - 45 (server with only 45ms latency) = 75ms 75 ms initial + 75 * 49/6 = 687,5 ms
  5. Ah! Thank you, that´s a nice piece of knowledge. I see then the impact of latency is greatly reduced, although not neligible in case of the 45ms server: 120 - 45 (server with 45ms latency) = 75ms 75 ms initial + 75 * 49/4 = 993,75 ms Then it adds almost a second, before any optimization, of course.
  6. Yes it seems so, I've been searching but haven´t found anything definitive. Always the lower latency, the better, but to what measure? Add to this that is not clear the benefits of server location in regards to SEO. Thanks for the links.
  7. Hello, I'd like to ask for a bit of experienced knowledge... How much is a good latency for a shared hosting? ------------- Well, better offer a little background: I'm using ICDSoft as a hosting provider for several of my clients websites (small and low traffic), and very happy with it. But, their servers are located in Amsterdam, and when I do a ping the result is about 120ms. So I could change provider and choose a closer one with better ping times, I found at least two good providers with ~45ms and ~75ms. As I understand that for each request the browser needs to make to the server that small bit of time is added, for example if the site makes 50 requests: 120 ms (server 1) - 75 ms (server 2) = 45 ms 50 requests x 45 ms = 2250 ms = 2.2 secs difference in response I understand too, that not only latency matters but server performance, how many users are sharing... so probabily there is not the 2.2 sec diference finally. But, and now I reformulate the question: Is latency worth enough to change hosting provider given those broad numbers, in your opinion? Thanks, Alejandro.
  8. I found myself once in that picture... luckily for me I realized in time.
  9. Yes, that's the case, I'm building a filterable portfolio, so I need the categories only as content "selectors/filters". But maybe in the future I could need those category pages and then I would need to create them anyway so it seems a more versatile solution.
  10. Mmm, it just seemed more simple, no need to think in a template, a parent page to hold the categories... not that is to much work in any case. Maybe I'd use the pages approach. Thank you anyway for the useful info .
  11. Hello, I was thinking to use this new field (from dev branch 2.5.17) to create several categories and then select one or multiple categories in each page. But I need to ouput the all the categories available in order to generate a navigation menu. I created the field "categories" with several "selectable options" then tried: $cat = $fields->get("categories"); foreach($cat as $c) { $c->title; } But this doesn´t output anything. Is there any other way? Thanks in advance, Alejandro.
  12. Hello, I'm using dev version 2.5.8 in one of my sites. This is may be a silly question but when I have over 30 notifications at the top, can I delete all at once instead of clicking each one? Thanks, Alejandro.
  13. As processwire.com uses Typekit, the situation: http://status.typekit.com/ Well it seems the problem in Australia has been resolved. In Spain the issue could be related to the ISP.
  14. You're right Adrian, no guest role is added. So I understand that upon user creation the "guest" role must be added.
  15. 2.4.10 But the guest role is indeed added, just it doesn´t appear under the column roles in the user list. So, at first I had the doubt if it was necessary to add it via API.
  16. It doesn´t work: Fatal error: Call to a member function addRole() on a non-object in /................ on line 150 So, back to the 2 lines method.
  17. Well, a bit cleaner Thank you.
  18. Hello, when creating a new user via API without assining the role 'guest' it seems PW assigns it by default. But it doesn´t appear in the user list roles column. Although is seems to be assigned anyway when displaying the user page. Update: the guest role appears when the user is assigned another role in de admin. 1) Should I assign the guest role when creating the user with the API? (I guess it´s not necessary) 2) Is there, anyway, an API syntax to assign 2 roles at a time?: $u->addRole("guest, customer") (doesn´twork) -------------------------------------- $u->addRole("guest"); $u->addRole("customer";) it works but a bit repetitive Thanks.
  19. Solved, finally! Session: Module Install - LanguageSupport Session: Installed ProcessLanguage Session: Created field: language_files Session: Created fieldgroup: language (164) Session: Created Template: language Session: Created Default Language Page: /..... Session: Installed ProcessLanguageTranslator Session: Created Language Translator Page: /..... Session: Created Langage Field: language Session: Added field 'language' to user profile Session: Added default language to 41 user profiles Session: Language Support Installed! Click to the 'Setup' menu to begin defining languages. Session: Module Auto Install: ProcessLanguage Deleting everything, seems to be the solution. Thank you all for your help.
  20. Aaaaand, deleted! Thanks ... but it wasn´t the obstacle to install Language support. The initial issue persists, but now the error message has changed: LanguageSupportInstall: Installed ProcessLanguage ----------------------------------------------- TemplateFile: Unable to install module 'LanguageSupport': Field may not be named 'language_files' because it is already used by another field<pre>#0 [internal function]: Modules->___install('LanguageSupport') # I'm going to examine the database again.
  21. It cannot be deleted through the API either. Fatal error: Exception: This page may not be deleted I think it is a system template: admin
  22. Mmm... I´ve been messing between local and remote installs of the site, and additionally alternating between PW dev and master versions, installed and uninstalled the Language Support Module, using the profile export module... I don´t really know what I´ve done. Daring guy here I guess... but: 1) I don´t know if ProcessLanguage is really installed, but when trying to install "Language support" the message shows: LanguageSupportInstall: Installed ProcessLanguage =================================================== TemplateFile: Unable to install module 'LanguageSupport': SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry 'languages-22' for key 'name_parent_id'<pre>#0 [internal function]: Modules->___install('LanguageSupport') ....... 2) Under Admin > Setup there is a "Language" page that perhaps is causing problems, but I don´t know how to delete it. 3) Opening the exported Site Profile and deleting "every" reference to "language", and installing a new fresh site with this profile seems to solve the problem. I think the problem is somewhere in the database tables, where I deleted every reference to languages as well but it didn´t work either...
  23. Hello, I think I installed the ProccessLanguage module before installing LanguageSupport. Now while trying to install it, an error is shown: TemplateFile: Unable to install module 'LanguageSupport': SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry 'languages-22' for key 'name_parent_id'<pre>#0 [internal function]: Modules->___install('LanguageSupport') #1 ...... (continues) I've uninstalled Processlanguage but throws the same error anyway, and it seems to install it again: LanguageSupportInstall: Installed ProcessLanguage although I've even deleted it from /wire/modules/LanguageSupport. ¿? The PW version running is 2.4.10, tried again downgrading to 2.4 and behaves identically. Thanks in advance, Alejandro.
×
×
  • Create New...