Lol, 240$ when all you got to do is to upload the auto update folders and go to yoursite.com/install/, where yoursite.com is, well, your site name. I could do it for 200$.
So I have some.php that assigns its result to a template after clicking on the submit button. Everything works fine but I don’t want the page to refresh after proceeding the form. Is there a possibility to ajaxify it? Adding action="some" and data-ajax="true" to the <form> elemen...
…Turned out that you cannot actually use „$template->assign_block_vars” when there’s only a single variable. I’ve used „$template->assign_var” instead.
Now everything works fine, but I need to find a way to get a result without having the page to reload.
Thank you all very much, the code’s now working and I gained necessary knowledge to move forward with my edits. One thing concerns me though, I can’t seem to assign block to a template. Now i have: $a = $request->variable('a', ' '); $b = $request->variable('b', 0); if ($request->is_set_post('submit'...
OK, so I managed to fix that with: $a = $request->is_set('a'); $b = $request->is_set('b'); $c = new calc(); if ($request->is_set_post('submit')) { $result = $c->getresult($a, $b); var_dump ($a, $b); } But hitting the „submit” button just reloads site nad var_dump gives me „bool(true)”. It didn’t out...
There were some mistakes in the code which aren’t present on my board. For example there’s no „$cal” you asked about. I was editing it to show off here on phpbb.com and I got clumsy. Sorry. I already edited first post.
$a and $b should be pulled from the form in the template. It goes like this: <form method="post"> <tr> <td>A:</td> <td><select name="a"> <option value="123">123</option> </select></td> </tr> <tr> <td>B:</td> <td><input type="text" name="b"></td> </tr...
I had a $c = new calc(); if(isset($_POST['submit'])) { $result = $c->getresult($_POST['a'], $_POST['b']); } which worked fine. Changed it to work with phpBB using: $request->is_set('a'); $request->is_set('b'); $c = new calc(); if ($request->is_set_post('submit')) { $result = $c->getresult($a, $b); }...
I sometimes had 500 error when I messed up something with the extensions – like syntax and such. I think that’s some implementation of phpBB security algorithms.