Thank you!

I didn't end up using it, but did find where I would need to change it!

To avoid adding to preg_replace(), I'm removing it at the end with strpos() / str_replace().

 <hook id="ps_parse_message_end"><![CDATA[
  if (strpos($text, 'http://img/')) $text = str_replace('http://img/', 'img/', $text);
 ]]></hook>

This way it only effects links having to do with my extension (in progress), and not any others.

Also, I didn't end up needing to add "base href".. smile

I'm making an extension where I'm using [img]path/file.jpg[/img] for uploaded (local) files (base href="/" is in <head>).

It's making me use the domain in the path. eg: http://domain.com/forum/path/file.txt

What do I need to change in the parser to allow "img" and "url" bbcode to use just "path/file.txt"?

In case anyone else has the issue.. The setting needed an "o_" prefix.

..apparently something in parsing (maybe having to do with $form) adds the o_ - where $forum_config does not.


So an example setting:

o_allow_notify

Is updated with this:

$form['allow_notify']

Which is carried here:

$forum_config['o_allow_notify']

smile

I'm brand new at making extensions for PunBB. For some reason I can't write to the config table on submit. The extension installs fine..


Here's an example:

<hook id="aop_features_avatars_fieldset_end"><![CDATA[
 ?>
 <input type="checkbox" name="form[allow_notify]"<?php if ($forum_config['allow_notify'] === '1') echo ' checked="checked"'; ?> />
 <?php
]]></hook>

<hook id="aop_features_validation"><![CDATA[
 $form['allow_notify'] = (isset($_POST['form']['allow_notify']) ? '1' : '0');
]]></hook>

There has to be something missing that's "PunBB specific"...  Is anything missing above that should be there?

If above looks correct, can anyone give me an example of saving a setting to the config table?

Looks like it won't send to a forwarder built off the domain doing the sending, a forwarder for a different domain works.


I'm not a fan of email troubleshooting - so I made a simple mod to BCC reciepients if the string has "Bcc:".

I haven't yet looked at how to build a plugin for PunBB, so it's posted under "PunBB 1.4 additions":

http://punbb.informer.com/forums/topic/ … ling-list/

This mod adds the ability to Bcc addresses from the admin mailing list.

I haven't messed with building a plugin yet, so it requires editing files.


In the file include/email.php find the line:

    // Make sure all linebreaks are CRLF in message (and strip out any NULL bytes)

(in the forum_mail() function, line 90 on a stock file)


Above it add:

// MOD BCC - Usage "Bcc: one@example.com, two@example.com". Add regular addresses (if any) before.
if (strpos($to, 'Bcc:') !== FALSE) {
 $bcc = explode('Bcc: ', $to);
 $to = rtrim($bcc[0], ', ');
 $headers = 'Bcc: '.$bcc[1]."\r\n".$headers;
}

Usage "Bcc: one@example.com, two@example.com". Add regular addresses (if any) before.

It looks like email input boxes don't accept the "Bcc:" (eg: user profiles), only the admin mailing list does.

First of all - I'd been using flux, got frustrated and decided to try PunBB. Everything's been a breeze so far... Great forum software! Thank you!!


I have an email that forwards to the moderators - it's used for things like reports and registrations ("if your mail doesn't arrive, contact moderators@domain.com").

The idea of the forwarder is that if someone has an issue and they email "moderators@domain.com" - we all get the mail and can resolve the issue as soon as the first moderator can log in.

The forwarder also keeps our addresses private. For instance, I send the alert to my phone (sms). I get it lightning fast that way, but I don't want my number in the "To" field of the mailing list.. even if I trust the moderators won't bug me. smile


The reports mailing list won't send to the forwarder for some reason.. I've tried everything I can think of, and no luck.

Is there something in the code that I'm not seeing? I've looked over forum_mail() and email.php.

If it's not possible to send to the forwarder, is there a way to make the mailing list addresses private (bcc)?


Thank you!