Jump to content

Frank Vèssia

Members
  • Posts

    601
  • Joined

  • Last visited

  • Days Won

    2

Everything posted by Frank Vèssia

  1. Soma, that works, a good solution, but in my case i need to paginate the result, for this reason i used the limit, but it looks like the built in pagination to this final PageArray doesn't work...
  2. Yes, infact i need to specify more than one page...
  3. oh, that's pitty...any workaround to obtain the same?
  4. Absolutely, I removed all other stuff i have...using just one ID it works without warnings...
  5. Yes, it'a a selector and the strange thing is the result is showed correctly...
  6. I have this selector $photos = $pages->find("template=picture,has_parent=2293|1038,limit=20,sort=-created"); I got this warning even i can show correctly my photos... Warning: preg_match() expects parameter 2 to be string, array given in /public_html/wire/core/Sanitizer.php on line 266/
  7. mm Ryan I'm trying to use your first suggest, there is some syntax error in there? The $fav variable is a pageArray ? If i want to set a limit in there?
  8. Ok, infact I paginate the result, thanks!
  9. mmm, i was thinking the same, but what about if i have hundreds of value? Is there any problem to select by ID in large amount? $database = $pages->fuel('db'); $userID = $user->id; $result = $database->query("SELECT `page_id` FROM `field_favorite` WHERE `created_user_id` = $userID")->fetch_assoc(); $listID = implode($result,"|"); $fav = $pages->find("id=$listID,limit=20,sort=-created");
  10. Hello, I created a "favorite page" system without using the page system of PW because using a page to store these info is to heavy. The problem now is to mix a regular query select to the API. Is that possible? some code... $database = $pages->fuel('db'); $userID = $user->id; $result = $database->query("SELECT `page_id` FROM `field_favorite` WHERE `created_user_id` = $userID"); $favs = $page->find("template=product,limit=20,sort=-created"); I want to connect the page_id result of my query to the PW query to get all my favorite pages.
  11. Thanks for suggestions
  12. There a limit in how much elements can I store inside a repeater? Right now I have a like system that store likes data (pageid and userid) in sub pages but could be nice to move this system inside a repeater field of the page template, I think to manage something like between 200-1500 records but I will never edit these records from the admin.
  13. The 404 comes from PW. I'm using: ProcessGoogleAnalytics ModulesManager ProcessRedirect FiledtypeSelect
  14. I'm running the 2.2.6.2. Same thing if i wrote directly in the address bar...not found Domain root
  15. Yes, the page is that. When i click on submit i can only see a js error: Failed to load resource: the server responded with a status of 404 (Page Not Found) http://www.domain.com/service-pages/?template=picture&sort=-modified
  16. @ryan: of course i made all the necessary setup...the default page doesn't work, when i click submit nothing happends...page not found...
  17. @Ryan: i got this fatal error during installation: [b]Fatal error[/b]: Using $this when not in object context in [b]/home/public_html/site/modules/ServicePages.module[/b] on line [b]287[/b] got it, sorry i didn't copy the php file in module folder I'm trying to use this module but when i perform a query i get page not found... i can see the default page with instructions but adding something like /service-pages/?template=picture&sort=-modified i get page not found
  18. For me i't very useful to have hidden content (system templates and field) always visible, when I'm in development, maybe using the config file, adding a new voice like config->devMode
  19. Another thing. In my form i display a list of input text according to the available repeaters, the inputs are filled with the corresponding value, if no repeater i display only one input. (I can add more input with a button) Now i noticed a strange behaviour, first the form displayed 3 empty input field for each repeater, because there was the option "Ready to edit" set to 3 so for my code there was 3 repeaters... When i removed this option there still some messy, especially in the admin tree, i can see the repeater field duplicated and also the 3 "ready to edit" fields not deleted. See the picture @Ryan: okay read right now, I thought to have the latest version...I'll update immediately...
  20. Ok found... $page>repeatername->sort("id");
  21. Can I sort elements of a repeater ? Sort for ID or custom field?
  22. OK i think i got the bug... I created the other 2 repeaters using the duplicate/clone function. Now i can see on "detail" tab the same value for all repeaters: This repeater uses template 'repeater_camera' and parent '/gladmin/repeaters/for-field-152/' Something wrong in the clone process ?
  23. I'm setting up 3 repeaters for the user template (i guess i can use repeaters with the user template). Well, when i'm trying to save some date via API with this code: if ($input->post->submit_equipment && $input->urlSegment1=="equipment"){ $camera = array(); $camera = $input->post->camera; $user->setOutputFormatting(false); foreach($camera as $c){ $cameraRow = $user->camera->getNew(); $cameraRow->title = $c; } if($user->save()){ $session->redirect("/profile-edit/equipment/success/",false); } } i got all my 3 repeaters filled with this data. The other problem is when i try to create some data from the admin...look at the picture...Missing field...what ?
×
×
  • Create New...