Thx a lot for your efforts!

wobo

Yes, I think so, although my knowledge is not good enough (by far) to actually tweak the broadcast code,
Like, because I learned Latin in school I understand most Italian documents but I would not be able to write one myself. sad

wobo

MattF wrote:

You need to have a delve in: include/email.php. That's the file responsible for the mail functions. You should be able to modify it to bypass a 450 error.

Sorry, but I disagree. Why should /include/email.php bypass any errors? If a mail gets sent via /include/email.php (like during the registration process or by a topic subscription) I definitely want to know when there is an error with an address, so I can ask the user to fix his profile's mail info.

Broadcast_Email plugin is rather a loop construct where I don't want to end the loop whenever an error occurs. So this loop construct should contain the error handling like, in simple words :

if return(pun_mail) = 1 then
  print "error with user_id [ID number]"
  go on


Sorry, I'm not a coder but you may get what I mean.

Broadcast_Email is a fine plugin, I was desperately searching for a forum mass mail routine. But it is useless for me if only one mail address in a large database is faulty.

wobo

MattF wrote:

Create a test group, add a few test accounts to it and modify the db query in the plugin to only pull that and the banned groups info. Then you'll easily be able to tell that it is both doing the ban list bit correctly, and that it is indeed sending the e-mails correctly. smile

In principle you are right, but in this case here such a test would not show me such an error as I get with the plugin because I don't know what causes this error. The problem is that there is no info at all how many mails were sent until the error occurred or which address caused the error.

wobo

MattF wrote:

Is it working okay now, that code?

I guess so because after fixing that prefix there was no error related to the banned user patch.

The problem with the whole thing is, there is no way to test such a thing as mass mailings. I already received mails from people who complained that they received the mail twice. sad

wobo

MattF wrote:

Any chance you could post a copy of the code as it was when you modified that code? I'm curious now. big_smile

smile Ok, here it is:

else if (isset($_POST['send_message']))
{

        require_once PUN_ROOT.'include/email.php';
        @set_time_limit(0);

        // Display the admin navigation menu
        generate_admin_menu($plugin);
// added by MattF--------------------------------------------------- //
        $banned_array = array();
        $idcheck = $db->query('SELECT username FROM punbb_bans') or error('Unable to fetch banned users', __FILE__, __LINE__, $db->error());

        while (false !== ($banned = $db->fetch_assoc($idcheck)))
                {
                    $banned_array[] = '\''.$db->escape($banned['username']).'\'';
                }

        $banned_array[] = '\'Guest\'';
        // ------------------------------------------------------------------- //

        $sql = "SELECT username, email
                                FROM ".$db->prefix."users
                                WHERE username NOT IN (".implode(', ', $banned_array).")
                                ORDER BY username";
        $result = $db->query($sql) or error('Could not get users from the database', __FILE__, __LINE__, $db->error());
        while($row = $db->fetch_assoc($result))

The problem with the banned users was the database prefix, we use only 'pun_'. While everywhere the prefix is called by its variable ($db->prefix) you named it 'punbb_' in your line starting with '$idcheck.....'. Although, I wonder why I did not get any error message (Unable to fetch banned users)?

pun_mail($mail_to, $mail_subject, $mail_message);

to

@pun_mail($mail_to, $mail_subject, $mail_message);

should, I believe, cause it to ignore/suppress the errors and continue.

Thx, I'll try this.

EDIT: Unfortunately the main problem is not solved by the '@' in front of the function name.

wobo

Thx, I looked there and posted the next problem there. sad

wobo

MattF wrote:
wobo wrote:

The patch to avoid banned users only left a blank page but not a single mail was sent.

It should have worked fine if you applied the changes correctly.

Yes, you should say such a thing smile
I inserted the code block by copy&paste, so there's no chance for a typo. But that's no problem as we have only 3 banned users (over more than 4 years!), I will not shed a tear if they got that mail...

The real showstopper is that error I described.

wobo

Stumbled upon this fine plugin and succeeded in working around the error 501 message by using Smarty's advice earlier in this thread. The patch to avoid banned users only left a blank page but not a single mail was sent.

After running for a while the plugin stopped with another error message:

Error: Unable to send e-mail. Please contact the forum administrator with the following error message reported by the SMTP server: "450 4.1.1 : Recipient address rejected: User unknown in local recipient table ".

I'm running a forum with >2,200 users. Now I don't know how many users have recieved the mail (or how many didn't). Isn't there a way to ignore such things like the 450 error and only report these after completion?

wobo

Oh, I thought I was in the thread for the plugin! Will search for it. EDIT: Can't find any such special thread with the searchwords "Broadcast Email"

That sounds like a screwed smtp server causing that error.

No, this smtp server works fine for all other parts of PunBB and that same smtp server does all my other mail traffic. I should know if it is not working correctly.

DaveM wrote:

That error pretty much says it all.  One of your registered addresses isn't valid and is making things blow up.  I don't know how the mod works but sendmail normally restricts the address lists to about 255 addresses so if the mod is trying to throw all 2222 at it at once things aren't going to function very well.

Oh, really? Hmm. So there is no way to use this plugin in a forum with more than 255 users? I wonder if anybody is using this in a larger forum, 255 users is a pretty small forum.

The other option means that there is a bad address in the database and the plugin does not have any error routine to jump to the next one? Bad.

So. does anybody know any other plugin or MOD to send a mass mailing?

The exact error message reads:

Error: Unable to send e-mail. Please contact the forum administrator with the following error message reported by the SMTP server: "501 5.1.3 Bad recipient address syntax ".

wobo

I was very pleased to find the pointer to this plugin. Downloaded, unzipped and uploaded. Wrote the message and hit the confirmation button. The plugin tells me that the message will be sent to 2222 (no joke! pure coincidence) registered users including the admin. I hit the "Send it" button and an error message popped up:

"Could not send the message, error in recipients mail address"

Hmm, sending mails about registering, password changes and new posts in subscribed threads works correctly, no errors. What could be the cause?

wobo

14

(69 replies, posted in News)

Is the icon bar of the editor a MOD? I did not know that.

I did not change any line of code which was added by MODs. I took the original 1.2.15 PunBB and made a diff with 1.2.17, then changed all those lines which were changed there. I did not touch any other code. So, something in the update has an influence on the behavior of the editor.

wobo

15

(69 replies, posted in News)

After updating (did it manually by using diff on each changed file because I am using the MegaPun version) I realized a problem with the edit function. When I edit a posting I posted earlier the icon bar in the editor does not work. A click on any icon in that bar (B, i, URL, smilie, etc.) results in submitting the posting at once, without processing the function I wanted to do.

wobo

Smartys wrote:
wobo wrote:

Ah, no. This does not solve the 2 major issues: different computers / access points, broken connections. In my country (Germany) most private broadband connections are terminated once in 24 hours, so you will have to read all posts before that break. Then there are other reasons for a connection break also.

The cookie set isn't a session cookie. So, a broken connection would have no impact. However, the different computer argument does have merit.

I see what you mean. But after a closer look at this mod here I see also that the installation is over my limited knowledge of PHP. There are too many conflicts with the modifications which are already there (I'm using MegaPun). I am quite sure that someone with better php knowledge could possibly install it, though.

And the way SMF marks post as read in the database versus this mod is very different. I will look into having the mark as read system allow a database component in 1.3.

Thanks a lot for the effort. Although people in my forum have accepted the change, after 2 months I still have users complaining about this feature.

Most users are very satisfied with the show_24 feature which I have extended to 48 hours. I also found out that no matter what the visit timeout is set to, I can stay logged in as long as I want to (ATM I am logged in for more than 12 days on one machine) and I see that many users do the same. No performance changes.

wobo

lie2815 wrote:

Here you go:
http://www.punres.org/desc.php?pid=108

Ah, I searched for 'member map' and it is called 'usermap', so I could not find it. smile
Unfortunately we cannot use this MOD because it depends on Google Map.
We do not want such things on our site.

The one I saw used free maps, integrated in the software package.

But thx anyway.

wobo

I searched but did not find anything like what I saw somewhere (unfortunately I can't remember where):
Registered users can give their geo coordinates in their profile. You can open a map with pins showing user's locations. You move your mouse over a pin and the users name and city is displayed.

Is there something similar for PunBB ?

wobo

Smartys wrote:

A better idea might be to set the timeout to a longer period of time (eg: an hour)

Ah, no. This does not solve the 2 major issues: different computers / access points, broken connections. In my country (Germany) most private broadband connections are terminated once in 24 hours, so you will have to read all posts before that break. Then there are other reasons for a connection break also.

With all due respect I have as a non-coder for all developers: you always talk about issues with the database growing too large or time or performance issues - there are none of those!
I am running a site with nore than 1200 registered users with a total of 140K posts, an average of 20 to 100 posts per day. I used a MOD with exactly the wanted feature for a long time in PHPBB and I used SMF for 2 years which has this feature built in. We never found any issue with this feature. There must be a way to limit the number of unread flags per user - because If a user stays away too long or if he never hits the "Mark all forums read" button  he will get an error message from the database (which could be displayed as a friendly "You have been away too long"). All he has to do then is hit the "Mark all forums read" button. Done.

I don't know exactly how the MOD in PHPBB or the function in SMF does it, code wise, If I knew I'd write a MOD myself. But my experience (see above) and all those users of SMF show that it is possible and that this function does not cause any issues as you wrote.

wobo

wobo wrote:

There's a mod for 1.2. What more do you want?

Oh? Where? If so, then what were we talking about in the last posts of this thread?

Found it. You meant the one which marks posts as read after the user reads them - which should be the logical behavior of a forum system in the first place. I was talking about a function where flags of unread posts are kept until the posts are actually read or "marked as read" by the user, regardless of session status.

Anyhow, about the MOD you meant: Reading the long thread I decided to go without it because it seems to collide with other equally needed MODs like subforums, private messaging, etc. I changed my live site now to MegaPun 2.0 and all is working nicely, so this seems to be the only important feature which is missing. Had a hard time to explain why PunBB uses such a non-logical system, though. But that's life as an admin, right? wink

So, everybody hopes for the best and if we can't get that, we hope for v.1.3 smile
wobo

Found out: /syn is a subdir installed by the easyMultisync MOD. I changed the code accordingly and everything works as expected now.

wobo

Ah! Your question made me look at a normal PunBB 1.2.15 tarball and I realized that the /syn directory must be a part of some MOD in the MegaPun version.
Ok, sorry, I asked here, I'll have to ask in the MegaPun forum then.

wobo

I set up PunBB 1.2.15 and it's working great, BUT: I don't have any scrollbars in code boxes, neither horizontal nor vertical. Long lines are cut at the window margin, no line break, no scrollbar. What can I do?
In /syn/config.php I found a line saying:

$syn_noscroll = true;

If I set this to 'false' my whole site bombs out, showing some apache error.

What can I do?

wobo

Smartys wrote:

Add a line for setlocale in the language file. The English common.php file has an example of how to do it, you just need to replace LC_CTYPE with LC_ALL

Hmm, did that, did not change anything (yes, I emptied the cache). The problem was something else:
In the code (index.php) I have the line:

$thisdate = date('l, d F Y', $cur_topic['posted']);

This should read

$thisdate = strftime('%A, %d. %B %Y', $cur_topic['posted']);

to work as wanted. The PHP manual says, LC_ALL (LC_TIME) only works with strftime.

wobo
Look, mom, I'm learning PHP!

Oh! Thx for the info, I did not expect that, other forum software I know have them in their lang/common.php (or elsewhere).
Now, how am I supposed to translate these expressions into a different language?

wobo