Jump to content

entschleunigung

Members
  • Posts

    67
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by entschleunigung

  1. maybe you can find some useful tipps here: https://geoffkenyon.com/ecommerce/urls-parameters/
  2. thank you, adrian, that was a great hint. and thank you robin for this module. i used this selector and it works fine: parent.id=1053
  3. hello, id=7753 ist for a specific id, but how can i manage this for an id and his children? thx
  4. sorry for the late reply. i check everything but nothing works for me at this moment, i will try a new installation of pw, perhaps i misconfigured something ... ?! (abdus, your last tipp i didn't try because i want start with a fresh installation, but thanks for the hint!) thanks for all tipps.
  5. hi abdus, i know about bootstraping the index.php, but why the function works with direct call the function in home.php and with ajax not? and this is the message, when i bootstrap index.php: Error: Cannot redeclare doSomething() thx
  6. hi alxndre, hi Zeka, i use ProcessWire 2.8.62 and they said for this version namespace are not necessary, right?
  7. hello, i have a _func.php file with this function. in the documentation i read that some api variables in functions are not available, so i use wire('pages'). function doSomething($u, $p) { $p = wire('pages')->get("id=$p"); $u = wire('pages')->get("id=$u"); $p->of(false); { ... populate repeater field stuff } $p->save(); } if i call this function in my home.php like doSomething(41,1093) (only for testing!) everything is fine, the function works, it add items to a repeater field. the german says "Wenn es dem Esel zu wohl ist, geht er aufs Eis", so i play around with ajax to fire up this function. $(document).ready(function() { $("#hit").click(function(){ $.ajax({ url: '<?= $config->urls->templates?>includes/_func.php/', type: 'post', data: {userID: "<?= $user->id ?>", pageID: "<?= $page->id ?>"}, success: function(output){ console.log(output); } }) }) }) i read something about variable scopes and i think i understand it a little bit. but i don't understand why doSomething(41,1093) works in home.php the ajax call runs into a Call to undefined function wire() ? also i tried if ($config->ajax) but no luck ... that's the relevant party of _func.php. function doSomething($u, $p) { $p = wire('pages')->get("id=$p"); $u = wire('pages')->get("id=$u"); $p->of(false); { ... populate repeater field stuff } $p->save(); } if(isset($_POST['userID']) && !empty($_POST['userID']) && isset($_POST['pageID']) && !empty($_POST['pageID'])) { $u = $_POST['userID']; $p = $_POST['pageID']; { ... } echo sendLike($u, $p); } where is my mistake? any ideas? thx
  8. sagol, yuvarlanıp gidiyoruz iste. means for the non-turkish members: thanks, this is really a great community and i learned a lot of interesting stuff. god bless ryan.
  9. sagol abdus, your solution is great and your explanation too, i will save it for further & greater problems i think my problem is solved by bernhards way. it's easy enough to deal with my zipcodes 0 - 9: THX
  10. hallo bernhard, selam abdus, thanks for now, i will try it and reply when it works or not, but this for-loop i see the first time. this loop really works with the fragezeichen or really works? THX
  11. hello there, this is my first post, please excuse my bad english. simple site building is not my problem. create templates, fields and pages and some foreachs in the templates and my easy sites are ready, with this stuff i'm familar. but now ...! i will try to explain what i want to do. i have a template with this fields: - name (text) - zipcode (integer) - city (text) that's need for a register with ca. 1000 records. what i want is now group this fields like this in the frontend. [ PLZ 1 (23) ] --- [ PLZ 2 (12) ] --- [ PLZ 3 (8) ] --- and so on. these should be buttons and the number in the bracket should show the count of records with starts this zipcode. click on the button shows me on the next page all records with zipcode e.g. PLZ 8 - 80331 - Name - 80337 - Name - 80337 - Name - 80539 - Name - 80539 - Name - 80638 - Name i think the logic is simple to unterstand but for me as a non-programmer is it difficult to group the fields and build the page. Auf Deutsch könnte ich das natürlich besser erklären, but has anybody a hint for me? thanks & greetings from munich
×
×
  • Create New...