Click anywhere to close this dialog

Farewell

Great is the art of beginning, but greater is the art of ending
Henry Wadsworth Longfellow

I announce that I cease all development and activity in the programming universe indefinitely. My career has reached the turning point I was not expecting for at least another year, leaving me highly off guard and without laid-out plans for this hobby's continuity. I have begun a 5-year residency program in Neurosurgery which is clearly not compatible, time-wise, with programming.

I gave in all my passion for developing, and you gave me back your loyalty and trust, even when I did not deserve that much. Now it is the time for payback. I release all my present and past work as Open Source software, in the hope some talented developer will continue maintaining and expanding my vision of a modern, sleek forum software. The intrinsic flexibility of MyBB is the true hidden gem of an otherwise outdated codebase; I do hope the project can continue and be updated complying to the latest coding standards.

I hereby thank Euan, kawaii, andrewjs18, Ben, Matt, Omar G., effone, Eric J., Devilshakerz, Wildcard, JordanMussi and all the other team members I have had the opportunity to work with when I was a MyBB team member. I thank Tomm M, my mentor, who inspired me to pick up coding with his piece-of-art plugins. And finally, I thank all of you MyBBoost subscribers who have helped me getting through my toughest university years economically.

Yours sincerely, Filippo

Sending custom pm

20 Nov 2019
#1
This issue is marked as solved
Shade after using symposium sending custom pm via pm_handler doesnt seem to be working. It increases the number of PM's and sends the message, but those cannot be accessed.

require_once MYBB_ROOT . "inc/datahandlers/pm.php";
$pmhandler = new PMDataHandler();
$pmhandler->admin_override = true;

  $pm = [          "subject" => 'test',
                        "message" => 'test',
                        "fromid" => -1,
                        "toid" => [1]
                    ];
                    $pmhandler->set_data($pm);
                         if ($pmhandler->validate_pm()) {
                        $pmhandler->insert_pm();
                        echo 'PM sent';
                    }
Shade 20 Nov 2019
#2
It should work as normal (you can see a demo here on MyBBoost itself: both Flyover and BankPipe notifications are delivered regularly). It might be an issue with either hooks priority or the fromid field (-1 might be an issue). I am not home but will check it out tomorrow.
ProX 21 Nov 2019
#3
No idea, works normal without symposium, when symposium is enabled, pm just disappears because it contains no convid.
Shade 21 Nov 2019
#4
It might indeed be an issue with hooks priority. Have you installed your plugin after Symposium? By design, Symposium adds convid when sending a PM through the handler (inc/plugins/symposium.php, line 1128, symposium_pm_insert_data); I can't really think about a scenario when this function does not run. A temporary FTP account might help me debug this, if you can.
ProX 21 Nov 2019 Edited
#5
I always test stuff locally :/

I run it as a new php file via my pages plugin from Omar g where you can create new php pages

When message is sent it needs to be converted via symposium converter to be shown

I am not sure if hooks can be loaded inside my pages?
Shade 21 Nov 2019
#6
Do you have a name of the plugin? If hooks can't be loaded, the whole $plugins object is null.
ProX 21 Nov 2019 Edited
#7
Ougc pages is the name i think. Very popular one though


https://community.mybb.com/mods.php?action=view&pid=6
Shade 21 Nov 2019 Edited
#8
Mind sharing your page settings so I can replicate them? I tried creating a random page with your code and the following settings and it works just fine with Symposium:

[Image: zooSleY.png]

[Image: oBtyKMD.png]
ProX 21 Nov 2019
#9
Use template wrapper and run at initialization set to yes in my case
Shade 21 Nov 2019
#10
Still works good. The template is precisely the one you posted? If so, you have to wrap it inside <?php ?> tags to execute the code.