1 (edited by KeyDog 2009-02-03 11:21)

Topic: Reverse Engineering Pun 1.2 Mods - Examples

This should be useful when someone needs to change an old pun 1.2 mod to work on 1.3
a. = pun 1.2     b. = pun 1.3
@devs - please check this stuff here smile

1. a. pun_htmlspecialchars($_POST['message_body']
1. b. forum_htmlspecialchars($_POST['message_body']
2. a pun_htmlspecialchars($_POST['message_subject']
2. b. forum_htmlspecialchars($_POST['message_subject']

3. a require_once PUN_ROOT.'include/email.php';
3. b require_once FORUM_ROOT.'include/email.php';

4. a. // Make sure no one attempts to run this script "directly"
if (!defined('PUN'))
    exit;
4. b. // Make sure no one attempts to run this script "directly"
if (!defined('FORUM_ROOT'))
exit;                       or
4. c. // Make sure no one attempts to run this script "directly"
if (!defined('FORUM'))
exit;


5. a.// Tell admin_loader.php that this is indeed a plugin and that it is loaded
define('PUN_PLUGIN_LOADED', 1);
5. b. ?

6. a. pun_mail($mail_to, $mail_subject, $mail_message);
6. b. forum_mail(???);

[// Wrapper for PHP's mail()
//
function forum_mail($to, $subject, $message, $reply_to_email = '', $reply_to_name = '')]

7.
7. b forum_trim

8 a.
8. b    // Default sender address
    $from_name = sprintf($lang_common['Forum mailer'], $forum_config['o_board_title']);

Re: Reverse Engineering Pun 1.2 Mods - Examples

http://punbb.informer.com/forums/topic/ … ded-to-13/

the above mentioned mod needs to be made into an extension

gues one way would be to just modify the php file - to reflect pun 1.3 naming - then call it from manifest.xml

no?

Re: Reverse Engineering Pun 1.2 Mods - Examples

We have created a new page on Wiki. We will fill this page with information about the differences between PunBB 1.2 and 1.3. You can help us with this too.

Re: Reverse Engineering Pun 1.2 Mods - Examples

ok thx.
for a start i'll keep comparing 1.2 to 1.3 code - maybe i'll also put some in a grid like extensions for easy filtering....