Search found 628 matches

by andreask
Mon Jun 06, 2022 7:51 pm
Forum: Extension Writers Discussion
Topic: Unit test noob (functional)
Replies: 3
Views: 521

Re: Unit test noob (functional)

Update... I've installed locally a dev enviroment (phpbb) according to this instructions. But when I run the test(s) I get the following error... andreas@devian [02:33:02 PM] [/var/www/html/phpbb] [master *] -> % phpBB/vendor/bin/phpunit phpBB/ext/andreask/ium/tests/functional/autodelete_page_user_t...
by andreask
Sun Jun 05, 2022 8:17 pm
Forum: Extension Writers Discussion
Topic: Unit test noob (functional)
Replies: 3
Views: 521

Unit test noob (functional)

Greetings, I am trying to write some tests and of course I'm failing miserably. Here is what I get for an error github . And this suppose to be my test . I don't believe it reaches to the actual test but failing earlier. But I don't understand what I am doing wrong. If any of you could help me and/o...
by andreask
Fri Apr 15, 2022 6:31 pm
Forum: Extension Writers Discussion
Topic: How many extension developers use GitHub?
Replies: 24
Views: 5540

Re: How many extension developers use GitHub?

Git and Github...
Mostly github, it's convenient and when you start to understand how it works it sometimes very helpful but also frustrating at times.
by andreask
Mon Dec 13, 2021 10:42 am
Forum: Extension Writers Discussion
Topic: UPDATE multiple rows but with different VALUE
Replies: 15
Views: 2002

Re: UPDATE multiple rows but with different VALUE

Many thanks for your help/input.
For now I just use the foreach way and in the loop I just run a single UPDATE for each pair.
I guess for now it's ok.
by andreask
Fri Dec 10, 2021 5:31 pm
Forum: Extension Writers Discussion
Topic: UPDATE multiple rows but with different VALUE
Replies: 15
Views: 2002

Re: UPDATE multiple rows but with different VALUE

This is how I do it (I mean it goes in the script) private function pair_secretsantas($ids) { // Initializing pairs array $pairs = []; // We need a key to walki through the array $key = 0; // Make a copy of ids to grab and delete rows freely. $temp_ids = $ids; // Walk through the array and create pa...
by andreask
Fri Dec 10, 2021 3:21 pm
Forum: Extension Writers Discussion
Topic: UPDATE multiple rows but with different VALUE
Replies: 15
Views: 2002

Re: UPDATE multiple rows but with different VALUE

You can see the script here . Basically it's pairs of user_ids where one user_id is pointing to another user_id. The first part is the user and the second part is the target user_id. There you can also see the foreach loop I've wrote. Imagine that if there'll be 5000+ users (ok doubtful, but you nev...
by andreask
Fri Dec 10, 2021 2:18 pm
Forum: Extension Writers Discussion
Topic: UPDATE multiple rows but with different VALUE
Replies: 15
Views: 2002

Re: UPDATE multiple rows but with different VALUE

It's not standard. The ext is expecting to have "participants" so it depends on the size of the forum members. Could be just 10 or could be 5000... Would it be possible to have a simple example of what you mean: you can chunk() an array into many chunked arrays to pass to the foreach() loo...
by andreask
Fri Dec 10, 2021 1:48 pm
Forum: Extension Writers Discussion
Topic: UPDATE multiple rows but with different VALUE
Replies: 15
Views: 2002

Re: UPDATE multiple rows but with different VALUE

My data is already convenient. I mean my array is in this form [ '26' => 'Value1' '44' => 'Value2' '177' => 'Value16' '299' => 'Value286' ] So I don't need them to be paired I only need to update the db with the paired data. Unless I didn't understood you correct in that case apologies!
by andreask
Fri Dec 10, 2021 12:26 pm
Forum: Extension Writers Discussion
Topic: UPDATE multiple rows but with different VALUE
Replies: 15
Views: 2002

UPDATE multiple rows but with different VALUE

Hello, In my ext I need to update a table USERS_TABLE where a amount of users have to be updated accordingly. So for instance: user_id 50 update ext column to VALUE user_id 62 update ext column to VALUE#2 user_id 73 update ext column to VALUE#4 user_id 88 update ext column to VALUE#7 I couldn't find...
by andreask
Tue Nov 30, 2021 6:33 pm
Forum: Extension Writers Discussion
Topic: assing variable in if() from condition...
Replies: 11
Views: 2644

Re: assing variable in if() from condition...

Thanks 3Di,

I've tried to use is_set_post() but for some reason I get ???? as a value...
I think add_form_key() is used. But I'll double check!
by andreask
Sat Nov 27, 2021 11:25 pm
Forum: Extension Writers Discussion
Topic: assing variable in if() from condition...
Replies: 11
Views: 2644

Re: assing variable in if() from condition...

Well, github was "down"... :|

But now it's up and running so here it is.
https://github.com/andreaskou/secretsanta_phpbb
And this one is the condition under question...
Of course modified to work as suppose to.
by andreask
Sat Nov 27, 2021 3:33 pm
Forum: Extension Writers Discussion
Topic: assing variable in if() from condition...
Replies: 11
Views: 2644

Re: assing variable in if() from condition...

No problem, yes I'll upload as soon as I have a more workable ext.
by andreask
Sat Nov 27, 2021 3:16 pm
Forum: Extension Writers Discussion
Topic: assing variable in if() from condition...
Replies: 11
Views: 2644

Re: assing variable in if() from condition...

@3Di I know that's why I asked... I don't know, I guess I was thinking too "creatively"? I was hoping that $variable would be populated by the result of the functions within the condition. ($this->request->variable('something', '') || $this->request->variable('something_else', '')) So I wo...
by andreask
Thu Nov 25, 2021 7:45 pm
Forum: Extension Writers Discussion
Topic: assing variable in if() from condition...
Replies: 11
Views: 2644

assing variable in if() from condition...

Hello, OK here is the stupid question of the year. Is it possible to have something like this? if ($variable=($this->request->variable('something', '') || $this->request->variable('something_else', '')) && $another_variable['some_data']) { // do something with $variable } Of course what I wa...
by andreask
Sat May 01, 2021 7:12 pm
Forum: Abandoned Extensions
Topic: [ABD] Giphy Embed
Replies: 19
Views: 6516

Re: [3.3][RC] Giphy Embed

Hi, I was trying to make an ext and then some good Samaritan point me your creation. Unfortunately my js skills is very limited so I had stuck several times on several problems. Anyways, perhaps it would be a good idea to capture "enter". As I said i suck on js but this is how I did it. in...

Go to advanced search