Search found 97 matches

by maxrpg
Tue Apr 20, 2021 1:42 pm
Forum: Extension Writers Discussion
Topic: Is there a notification class or anything?
Replies: 2
Views: 856

Re: Is there a notification class or anything?

There is nothing simple about notifications!! See - https://area51.phpbb.com/docs/dev/3.2.x/extensions/tutorial_notifications.html Why is it not this simple That is question we have been asking for years I see :shock: Think I'll pass on the notifications bit then. Too much faff lol. Hopefully it wi...
by maxrpg
Tue Apr 20, 2021 1:16 pm
Forum: Extension Writers Discussion
Topic: Is there a notification class or anything?
Replies: 2
Views: 856

Is there a notification class or anything?

Hi, Been trying to figure out how to send a user a notification but everything I've looked at has driven my mind insane. Looks like you need to create another file in a "notification" folder and use several bits of code between files to do it. Isn't there just a simple class or anything, s...
by maxrpg
Fri Mar 26, 2021 12:36 pm
Forum: [3.3.x] Support Forum
Topic: Download/View attachment permission based on file type?
Replies: 2
Views: 517

Download/View attachment permission based on file type?

I'd like guests to be able to view images in my posts but not be able to download files but the only option/permission I can find is "Can download files" but that also disables images from showing in posts. Is there a file type permission somewhere? I'm not sure why "Can download file...
by maxrpg
Tue Mar 16, 2021 3:05 pm
Forum: Extension Writers Discussion
Topic: Using core.get_avatar_after?
Replies: 3
Views: 860

Re: Using core.get_avatar_after?

Perfect. Thank you so much.
by maxrpg
Tue Mar 16, 2021 1:41 pm
Forum: Extension Writers Discussion
Topic: Using core.get_avatar_after?
Replies: 3
Views: 860

Using core.get_avatar_after?

I'm trying to change the class in the avatar HTML but I'm stuck and can't get it to work. I have: 'core.get_avatar_after' => 'avatar_change', public function avatar_change($event) { $ava_data = $event['html']; $ava_data = str_replace('avatar', 'newavatar', $ava_data); $event['html'] = $ava_data; } W...
by maxrpg
Thu Mar 04, 2021 4:11 pm
Forum: Extension Writers Discussion
Topic: Replace variable in language file?
Replies: 7
Views: 1134

Replace variable in language file?

Hi

In phpbb language files if you have something like:

Code: Select all

'DEMO_TEXT'  => 'My best animal is %1$s',
How do I go about replacing %1$s with whatever text I need to replace it with before showing it in template? :?

I can't find how its done.

Thank you
by maxrpg
Thu Feb 18, 2021 11:43 am
Forum: Extension Writers Discussion
Topic: Not showing custom BBcodes on extension form
Replies: 3
Views: 737

Re: Not showing custom BBcodes on extension form

Without seeing your code and what you are trying to do it is impossible to say. A link to your GitHub would be a start. Bascially its just this in the template: <!-- INCLUDE overall_header.html --> <!-- INCLUDE posting_buttons.html --> <form id="postform" method="post" action=&q...
by maxrpg
Thu Feb 18, 2021 11:19 am
Forum: Extension Writers Discussion
Topic: Not showing custom BBcodes on extension form
Replies: 3
Views: 737

Not showing custom BBcodes on extension form

Hi, I've managed to get a form in my extension with the BBCodes displaying above it, they are working but its not showing my custom BBcodes. Also when I hover over the buttons it shows the "title" popup as "BBCODE_B_HELP" instead of "Bold Text". Is there something I nee...
by maxrpg
Tue Feb 09, 2021 2:10 pm
Forum: [3.3.x] Support Forum
Topic: Database cleanup tools?
Replies: 3
Views: 3975

Database cleanup tools?

Hi, I've been running my site for nearly 12 years now and over the years the database has had fields and tables added for loads of mods. Mods which were removed many moons ago but left their database changes behind. There used to be a tool that did a database clean-up and removed all the junk fields...
by maxrpg
Mon Feb 08, 2021 4:15 pm
Forum: Extension Writers Discussion
Topic: Update schema without deleting existing data and reinstalling?
Replies: 3
Views: 624

Re: Update schema without deleting existing data and reinstalling?

You create another migration file that has a depends_on() function in it that checks that the first migration has been run. So say I made a file called "scheme_data_v2" I would use this code in it to add new data: class scheme_data_v2 extends \phpbb\db\migration\migration { static public ...
by maxrpg
Mon Feb 08, 2021 3:26 pm
Forum: Extension Writers Discussion
Topic: Update schema without deleting existing data and reinstalling?
Replies: 3
Views: 624

Update schema without deleting existing data and reinstalling?

Hi, Just another quick question regarding the schema file. I know how to add configs in the file under: public function update_data() That works fine. But how to I add new configs to my extension once the extension is installed and running? The only way I can get it to work is by uninstalling the ex...
by maxrpg
Sat Feb 06, 2021 4:09 pm
Forum: Extension Writers Discussion
Topic: DB DISTINCT Query help
Replies: 7
Views: 964

Re: DB DISTINCT Query help

kasimi wrote: Sat Feb 06, 2021 12:49 pm The query I posted should return only distinct users. Can you post your code?
I had the query part wrong. This code worked perfectly.

Thank you so much :D
by maxrpg
Sat Feb 06, 2021 11:09 am
Forum: Extension Writers Discussion
Topic: DB DISTINCT Query help
Replies: 7
Views: 964

Re: DB DISTINCT Query help

My bad, left join won't work. You should run two separate queries: first the post data, then the user data. For the user data you can use the user_loader service: $sql_ary = [ 'SELECT' => 'p.post_id, MIN(p.post_time), p.topic_id, p.poster_id', 'FROM' => [POSTS_TABLE => 'p'], 'WHERE' => 'p.topic_id ...
by maxrpg
Fri Feb 05, 2021 2:45 pm
Forum: Extension Writers Discussion
Topic: DB DISTINCT Query help
Replies: 7
Views: 964

Re: DB DISTINCT Query help

Don't cross join. Only select from USERS_TABLE and left join the POSTS_TABLE. How does one do that please? I'm new to these queries. david63 suggestion didn't work. This is the code I have: $sql_ary = array( 'SELECT' => 'u.username, u.user_id, p.post_id, p.post_time, p.topic_id, p.poster_id', 'FROM...
by maxrpg
Fri Feb 05, 2021 2:14 pm
Forum: Extension Writers Discussion
Topic: DB DISTINCT Query help
Replies: 7
Views: 964

DB DISTINCT Query help

Hi, I have this query which gets all the members usernames who have posted in a topic: $sql_ary = array( 'SELECT' => 'u.username, u.user_id, p.post_id, p.post_time, p.topic_id, p.poster_id', 'FROM' => array( USERS_TABLE => 'u', POSTS_TABLE => 'p', ), 'WHERE' => 'u.user_id = p.poster_id AND p.topic_i...

Go to advanced search