View Full Version : [Release v2] Updated Community Bulletin Generator
tubedogg
Tue 8th May '01, 8:29pm
SPECIAL NOTE for those upgrading to vBulletin v2.0.0: You will need to make changes to the default RC3 files, as you did with the previous version files. The files are member.php and admin/index.php. After you upgrade to RC3, the link in your Admin CP will no longer be there. In order to find instructions for upgrading, go to http://yoursite/forum/admin/commbull.php and click the link for Instructions. Make these changes to your files, and reupload the two modified files. The link will then be back in your Admin CP.
------------------------------------------------------------------------------------
With Kier's permission, I am rereleasing this hack. It has been updated, but most of the credit still goes to Kier. I just added a couple things. ;) Namely, I took Kier's starting point for birthdays and reworked it a bit so they can now be included. I also added 3 new sets of Latest Threads input, and added a sorting option to get topics with no replies (aka "Virgin" topics).
I also added a box to change the section separation character (Kier had it as a "-", now you can change it) and the list item character (Kier had it as an "o"). There are also instructions on how to integrate it into your Admin CP.
To install, just upload it to your Admin directory and go to it in a browser.
If you had previously installed Kier's original version, simply overwrite the commbull.php file on your server, and make this change to your admin/index.php file:
Find
<a href="email.php?s=<?php echo $session[sessionhash]; ?>"> Email users </a><br>
and right below it, add
<a href="commbull.php?s=<?php echo $session[sessionhash]; ?>"> Send Community Bulletin </a><br>
Upload your admin/index.php file and go to your Admin CP. You should see the new option under "Users" on the left-hand side.
Hack version: 0.98
Changes since v0.97: Fixed a stupid bug that screwed up the script when you posted a copy to a forum and that forum didn't count posts toward post totals. :rolleyes:
Changes since v0.96: Fixed a minor bug that was causing large problems when the number of emails to send was more than it was set to per page. :o
Changes since v0.95: Minor cosmetic changes; fixed "copy post to board" function so it actually works; added option to exclude threads from being used more than once (if doing multiple blocks); fixed sorting by most replies/most views so they don't return threads with 0 replies or 1 view, respectively;
Changes since v0.93: Option to post a copy of the email to your board, to a forum you specify using a username your specify (If you do this, there is a function to exclude certain parts (for example, the user info section that details username/password etc) and it parses URLs so the message on your board has hyperlinks to the threads/polls/etc); various cosmetic upgrades; minor little things here and there; fixed/changed "Only include threads that have been started or replied to since this date?" so it doesn't defeat the purpose of specifying a date.
For version: v2.0.0
Info for Clean Install -------
Files needed: commbull.php
Files to edit: admin/index.php, member.php
Templates to edit: none
Instructions are in the script itself. When you first run it, it will tell you what you need to do. If upgrading from Kier's original version, see instructions above.
End Info for Clean Install -------
Info for Upgrading from v0.90, v0.91, v0.93, v0.94, v0.95, v0.96, v0.97 ------
Files needed: commbull.php
Files to edit: none
Instructions: Upload the commbull.php file from the commbull98.zip file.
End Info for Upgrading -------
Please do not bug Kier about this hack!
Please also DO NOT contact me via AIM, ICQ, PM, or email about this hack. Post your question/problem here and I will try to help you.
chrispadfield
Tue 8th May '01, 9:13pm
wicked! excellent changes. Can't wait to final and i can install all these wicked hacks!
next would be a way to make this work via cron so i can get it going daily/weekly automatically. would have to read a config file i guess but should be possible. I might try and explore this.
JJR512
Wed 9th May '01, 2:14am
What exactly does this do, what's its purpose? Is there a demo?
tubedogg
Wed 9th May '01, 2:27am
http://www.vbulletin.com/forum/showthread.php?threadid=12366
Angelus_au
Wed 9th May '01, 5:12am
Great Hack to both Kier & tubedogg btw it does work with RC1
Dontom
Wed 9th May '01, 6:11am
Hi, thanks for this great hack!
I have a small problem, everything works fine, except the part within the users cp - both Radio-Buttons are not selected, selcting one and updating profile has no effect...
I double checked my installation but did not fint any mistakes...
any idea??
Tom
tubedogg
Wed 9th May '01, 6:19am
Make sure you have reuploaded your member.php file. If you have made the changes to that file and uploaded it, there is no reason why one button shouldn't be checked after going back to the User CP for the second time.
Dontom
Wed 9th May '01, 6:25am
...still no idea:
this is my member.php:
http://forum.mtb-news.de/member.phps
If you like to take a look at the profile you can login with test/test
@ http://forum.mtb-news.de
tubedogg
Wed 9th May '01, 6:39am
The problem is member.php file has the part you are supposed to look for twice in it, and you happened to get it in the wrong place. :eek:
To remedy this, get a fresh copy of member.php from your RC2 zip file and make the changes to it again, only noting this difference. The first bit it tells you to add, do this instead.
Find
if ($bbuserinfo[adminemail]) {
$allowmailchecked="checked";
$allowmailnotchecked="";
} else {
$allowmailchecked="";
$allowmailnotchecked="checked";
}and right above it, add
if ($bbuserinfo[receivebulletin]) {
$receivebulletinchecked = " checked";
$receivebulletinnotchecked = "";
} else {
$receivebulletinchecked = "";
$receivebulletinnotchecked = " checked";
}
The other directions remain the same. Sorry about that.
I have fixed the instructions and released v0.92 in the first post of this thread.
Dontom
Wed 9th May '01, 6:54am
Tubedogg,
thank you, works perfect now!
Call me Bugfinder
:D
Tom
RobAC
Wed 9th May '01, 7:03pm
Tubedogg,
I assume that if I install this hack now, I'll have to re-hack this after each forum software upgrade, correct?
JJR512
Wed 9th May '01, 8:08pm
I've discovered a tiny little bug in this.
In the instructions that show up from commbull.php, it says to add to the admin/index.php file this:
<a href="commbull.php?s=<?php echo $session[sessionhash]; ?>"> Send Community Bulletin >/a><br>
The very end should say ></a><br> ... In other words, you are missing the < in </a>. As far as I can tell, this only affects the way the link is displayed in the admin cp. It works, it just shows up wrong.
tubedogg
Wed 9th May '01, 9:53pm
Yes you're right :) I'll put up the fixed version in just a minute. Just a minor change, no need to upgrade if you've already installed it.
In admin/index.php, find
<a href="commbull.php?s=<?php echo $session[sessionhash]; ?>"> Send Community Bulletin >/a><br>
and replace it with
<a href="commbull.php?s=<?php echo $session[sessionhash]; ?>"> Send Community Bulletin </a><br>
Fixed. :) Thanks JJR.
tubedogg
Wed 9th May '01, 9:54pm
RobAC: Yes, you will have to rehack member.php and admin/index.php, however they are minor changes.
tubedogg
Thu 10th May '01, 11:50am
I have updated the first post in this thread with new v0.95, which has new features as detailed in that post. :)
JJR512
Thu 10th May '01, 3:36pm
Question about the upgrade. What I have is commbull92. Do I just simply upload the new file and that's it? Or do I need to run it and do all the instructions again, or what?
chrispadfield
Thu 10th May '01, 3:55pm
Couple of suggestions if anyone is interested...
1. Threads only get set once. My worry is that for the threads like "top ten recent activity" i am often going to get the same ones coming up, like "word game" sort of thing. Perhaps nice if you could add a field to thread to turn that thread of after it has been used once (also preventing the same thread appearing more than once in each mailing). This would be quite a big hack i presume and perhaps not worth it.
2. Automatic
This would be mega useful. Basically, the way i see it happening is having a slightly different version of the script in which you hard code your options (not hard me thinks) and then that is run by cron at your set time.... but..
3. Option in profile for frequency.
To make it trully automatic have a frequency setting in profile (perhaps limit this to daily, weekly or monthly). The mailer the cron script then runs through but only sends to those on weekly if it is a monday and only to those on monthly if it is 1st of month.
anyway, that whole automatic cron thing would be cool if someone is interested...
smelialichu
Thu 10th May '01, 4:00pm
I have some suggestions. the statistics, I was hoping to use this to send outg weekly stats. It would be useful to have it so you can show statistics from the start and from lets say the last week? Also it would be nice to include new stories. We have a news forum and it would be nice to email our users a copy of the text. Only of the first post though?ome more stats would be nice, or you could help me get more stats :)
JJR512
Thu 10th May '01, 4:10pm
I almost forgot, I have two suggestions, too.
1. Add an area on the page where you set your options of what you want to send, etc., for you to type in some text to be included with the message. A textarea thing. So you can add some thoughts or comments, or maybe a promo message, something that you might want to change each time.
2. Right now a user can disable receiving this for himself by editing their options. I'd like to have the same thing in the admin cp part of editing a user, so I can disable it (or enable it ;)) for a user, myself.
3. (Yes I said two, but this just came to me!) The preview feature doesn't show you exactly what you really end up getting. Could you include a way to send a test email to just one address, like your own address?
Kier
Thu 10th May '01, 6:54pm
Originally posted by JJR512
I almost forgot, I have two suggestions, too.
1. Add an area on the page where you set your options of what you want to send, etc., for you to type in some text to be included with the message. A textarea thing. So you can add some thoughts or comments, or maybe a promo message, something that you might want to change each time.
Ummm... you already have this ability.
JJR512
Thu 10th May '01, 7:16pm
Well perhaps you would care to show me where. I look at the Community Bulletin Email Generator in my Admin CP, and I see options to select what date to start from, thread blocks 1-4, polls, events, other info, layout, a thing to select which forums to include from, a thing to select which usergroups to mail to, and that's it. Nowhere do I see a textarea for me to type in a message that will be included in the email. I would take a screenshot and ask you to point it out to me, but since I have to scroll to see the whole thing, I'd have to take and post multiple screenshots, and I really don't feel like doing that. Please just tell me where exactly it is, because I don't see it.
tubedogg
Thu 10th May '01, 9:11pm
Press the "Preview" button at the bottom of the first page and then edit as you like in the text box on the second page...
tubedogg
Thu 10th May '01, 9:13pm
Originally posted by JJR512
Question about the upgrade. What I have is commbull92. Do I just simply upload the new file and that's it? Or do I need to run it and do all the instructions again, or what?
Download the commbull95.zip file from the first post and unzip the commbull.php file from it, and upload it your admin directory, overwriting the old commbull.php file. That's it :)
tubedogg
Thu 10th May '01, 9:14pm
Originally posted by JJR512
3. (Yes I said two, but this just came to me!) The preview feature doesn't show you exactly what you really end up getting. Could you include a way to send a test email to just one address, like your own address?
It doesn't?
JJR512
Thu 10th May '01, 9:17pm
Originally posted by tubedogg
Press the "Preview" button at the bottom of the first page and then edit as you like in the text box on the second page...
Ahh, I see it now:
You may alter any of the text shown here.
I had missed that earlier, and didn't realize you could edit the preview. Oops! :)
JJR512
Thu 10th May '01, 9:22pm
Originally posted by tubedogg
It doesn't?
Well, it mostly does, but still... I guess it really does, it's just that it just looks a little bit different in my email than it does in the preview. I guess it's just a matter of fonts and formatting and stuff. It's not a big deal, I supose.
tubedogg
Fri 11th May '01, 6:41am
I have updated the first post in this thread with the latest version of the Community Bulletin Generator. It is v0.96, and will function with RC1, RC2, and RC3 of vBulletin v2. Changes are detailed there, as are instructions for upgrading the Community Bulletin Generator.
Note to those upgrading to RC3: There is a special note for you in the first post in this thread regarding upgrading and this hack. Please read it! :)
-DLoH-hammer
Sat 12th May '01, 10:10am
i get this error is i activate birthdays ins sendoptions
Database error in vBulletin Control Panel: Invalid SQL: SELECT * FROM user WHERE
SUBSTRING(birthday,6)>='05-12' AND SUBSTRING(birthday,6)<='05-26' ORDER BY SUBSTRING(birthday,6) LIMIT
0,10
mysql error: You have an error in your SQL syntax near 'SUBSTRING(birthday,6) LIMIT 0,10' at line 1
mysql error number: 1064
Date: Saturday 12th of May 2001 03:03:12 PM
Script: /forum/admin/commbull.php
tubedogg
Sat 12th May '01, 10:13am
What version of MySQL is your host running?
-DLoH-hammer
Sat 12th May '01, 10:52am
cant say it :(
is there a way to check the version online ?
tubedogg
Sat 12th May '01, 11:17am
Try going to http://myurl.com/myforums/phpinfo.php
If that file is there, it should tell you what the MySQL version number is.
If it is not, you can download the attached file from this message, rename it to mysqlver.php and upload it your main forums directory. Go to it in a browser and it will tell you the version number.
-DLoH-hammer
Sat 12th May '01, 11:25am
k thx
mysql is on version
MySQL Support enabled
Active Persistent Links 0
Active Links 0
Client API version 3.23.22-beta
MYSQL_INCLUDE
MYSQL_LFLAGS
MYSQL_LIBS
tubedogg
Sat 12th May '01, 11:36am
Odd...SUBSTRING() was added in v3.22.4. And my testbed is running the same version of MySQL as you are and it works fine for me...Maybe try reuploading commbull.php.
I honestly cannot think of any reason why it wouldn't work.
Pingu
Sat 12th May '01, 12:03pm
I'm getting the same error on the birthday query, and I'm running MySQL 3.22.32
The workaround is not to use the birthday feature of commbull :(
tubedogg
Sat 12th May '01, 12:11pm
If you are running 3.22.32 that would explain it: substring wasn't added until 3.22.4.
I'll look into some other way to do it.
Pingu
Sat 12th May '01, 12:12pm
Thanks!
I'm not ready to upgrade MySQL eventhough I would like to. But I'm too stupid for that :(
RobAC
Sat 12th May '01, 1:38pm
Couple questions, observations:
What are "blocks"....block 1, block 2, etc?
I noticed that the dates shown for new thread replies are all 1-18-2038?????? Is this some kind of Y2K bug somewhere??
tubedogg
Sat 12th May '01, 10:09pm
Blocks allow you to present different sets of threads, sorted in different manners. For example, you could set the first block to "no replies" and the second to "most replies" and you would get two different sets of threads.
The date is a problem with the UBB5 -> vB import script.
Look here (http://www.vbulletin.com/forum/showthread.php?postid=104825#post104825) for a script to fix the dates. (Backup your database FIRST!) Upload it your admin directory and run it.
RobAC
Sun 13th May '01, 1:58am
Tubeddog-
There's still a bug in the that script to update the date problem. I downloaded the new script you posted and still got a parse error on line 15. I had to change this line towards the bottom:
if ($i = $50) {
echo("Updated another 50 threads...continuing<br>");
$i = 0;
I changed the :
if ($i = $50) {
to be
if ($i = 50) {
NOTE: I took out the $ sign before the 50, then the script ran without problems.
Originally posted by tubedogg
Blocks allow you to present different sets of threads, sorted in different manners. For example, you could set the first block to "no replies" and the second to "most replies" and you would get two different sets of threads.
The date is a problem with the UBB5 -> vB import script.
Look here (http://www.vbulletin.com/forum/showthread.php?postid=104825#post104825) for a script to fix the dates. (Backup your database FIRST!) Upload it your admin directory and run it.
RobAC
Sun 13th May '01, 2:23am
Also, the hack works well in sending out the bulletin, but when you assign a copy to be saved in a particular Forum number, it doesn't save it. I assigned my username and in my profile, it shows that the bulletin is my last post, but when you click on the link, it can't find it.
tubedogg
Sun 13th May '01, 2:31am
:o Sorry about the $50 thing. :o
tubedogg
Sun 13th May '01, 4:15am
Originally posted by RobAC
Also, the hack works well in sending out the bulletin, but when you assign a copy to be saved in a particular Forum number, it doesn't save it. I assigned my username and in my profile, it shows that the bulletin is my last post, but when you click on the link, it can't find it.
That's really odd. I've gone back over the code and tested it a few more times and it works on mine. Make sure the forum you put in is a forum, not a category. That's the only thing I can think of.
Mark Hewitt
Mon 14th May '01, 8:03am
Instead of just number of users since last update it could list the names of all the users.
Each post mentioned would be better with the forum name added as I have posts such as "Your thoughts on the last race" which could well be for any forum.
The ability to go through each forum individually and list the most popular threads in each, rather than just overall for the whole board.
Make the thing template driven so no code edits are needed to alter the standard layout.
tubedogg
Mon 14th May '01, 9:02am
Originally posted by Mark Hewitt
Make the thing template driven so no code edits are needed to alter the standard layout.
I'll look into the others, but this bugged me.
It isn't template driven per se, but you can edit any of the text in the preview box so it looks however you want it to look. You can change the look of the whole thing without touching one bit of code.
Mark Hewitt
Mon 14th May '01, 9:06am
Originally posted by tubedogg
I'll look into the others, but this bugged me.
It isn't template driven per se, but you can edit any of the text in the preview box so it looks however you want it to look.
Oh yes I know this. However I'm lazy and I want to be able to send out the bulletin with as little work as possible.
There are many standard things I like to have in my bulletin but I don't like having to put them in every time I send it out.
Sarge
Mon 14th May '01, 1:48pm
I installed it and eveything worked except...
I sent 500 at once.. and the link at the bottom said sent more for the next 5 hundred.. and the code is wrong for the input button. For some reason it is set to resend the first 5 hundred and I cannot figure out how to go and post the next 500
Thanks
Chris
tubedogg
Tue 15th May '01, 6:10am
Well, I found the problem. This should have caused a parse error in the first place (and it would have been caught before this then, too :D). Anyway, easy fix. You can either make the change yourself or download the updated commbull.zip file from the first post in this thread.
If you want to do it yourself, open commbull.php and find
if ($page = 1) {
and change it to
if ($page == 1) {
jojo85
Tue 15th May '01, 9:00am
I'm not sure but i think,and it's my opinion,;) , than tubedogg will be soon in the dev team :p hehe
Good works man
amykhar
Tue 15th May '01, 9:31am
Stupid question time (Don't worry guys, eventually I will get a clue). I have it installed, and it sent out the bulletin beautifully.
Question is, will it send one out automatically every week, or do I have to go manually remember to do it? If it is a manual process (which I suspect it is) how much time would it take to make the hack so that it stays configured the way I set it, and then runs once a week?
Amy (the lazy one)
tubedogg
Tue 15th May '01, 9:54am
For right now you must do it manually. I'm going to work on some way for it to work by itself in the future.
TechTalk
Tue 15th May '01, 5:27pm
Well id really like to use this feature but it seems as though I have the version of MySQL that doesnt support it :(
Database error in vBulletin Control Panel: Invalid SQL: SELECT * FROM user WHERE SUBSTRING(birthday,6)>='05-15' AND SUBSTRING(birthday,6)<='05-29' ORDER BY SUBSTRING(birthday,6) LIMIT 0,10
mysql error: You have an error in your SQL syntax near 'SUBSTRING(birthday,6) LIMIT 0,10' at line 1
mysql error number: 1064
Date: Tuesday 15th of May 2001 03:28:44 PM
Script: /vbforums/admin/commbull.php
Referer: http://www.iguanaland.com/vbforums/admin/commbull.php
glenv
Tue 15th May '01, 7:25pm
I installed this hack and it looks real nice.
I really just wanted to have a way to email all those who are "awaiting email confirmation"
I notice it will not mail unless I select a forum. Is this the way it should work? I would think a lot of webmasters just want to email without having to select recent posts to include. I see there is a work around. Just delete that info from the message before you send it. I just don't know why it makes you select anything.
In any event...
I am at this point:
I have edited the message to be sent as follows and selected the group "awaiting email confirmation" to send it to. However, I do not see how this will help the people I am sending to since all it does is send their user name and password. Unless I am missing something, don't they still need to have the "confirmation link" to be registered? Will this hack generate that for them?
I may be missing something. If this works though, it will be awesome. I have about 800+ folks that never confirmed their registration.
Thanks!
Glen
Message as I have ready to send:
Yes-Its-Free! Community Bulletin
A while back
o Your username is: "$username"
o Your password is: "$password"
o You have $posts posts
o You registered on $joindate
o You were last active on the boards at $lastactivity
Best regards, The Yes-Its-Free!
tubedogg
Wed 16th May '01, 7:43am
The link to activate is generated randomly, so you couldn't send it through this script (without significant modification). However, you could tell them to visit http://yourdomain.com/register.php?action=requestemail to get another activation email.
This hack is specifically meant as an update email, so yes it is supposed to error if you haven't selected any forums. If you don't want that info, you could use the standard email function in vBulletin. (You can put their username and password in an email via that.)
TechTalk
Wed 16th May '01, 9:04am
No word on the error i receive?
tubedogg
Wed 16th May '01, 9:11am
Sorry...I missed that post. Anyway it seems that some versions of MySQL don't want to sort by SUBSTRING. I'm currently trying to figure out a way around it. For right now the workaround is to set birthdays to 0. :(
amykhar
Wed 16th May '01, 7:33pm
Kevin,
I hate to be a pest, but can you please put the necessary changes to member.php here?
I had to move servers, and accidentally deleted my modified members.php. commbull.php think's it's already installed because the database is configured. I just need to modify the php files.
Thank you,
Amy
tubedogg
Thu 17th May '01, 6:47am
Actually this is really simple. :) Just go to
http://www.epinionaddicts.com/forum/admin/commbull.php
in a browser, log in, and click "instructions" at the bottom of the first page. You will be given all the modification instructions. :)
amykhar
Thu 17th May '01, 9:04am
Thank you. All fixed now. One suggestion though. The link to turn it on or off for users should also show up in the control panel when we search for a user. I get the occasional computer-phobe that asks me to turn things off for them.
Amy
Maverick1236
Thu 17th May '01, 9:34pm
I REALLY like this one!!
Thanks for your work and time!!
RobAC
Sun 20th May '01, 2:23pm
This morning when I went to run the community bulletin generator, it stalled when I went to run the second batch of 500 users. I never received one, but I had reports from several users that they received anywhere from 2-4 bulletins. Has anyone else had this problem??
tubedogg
Sun 20th May '01, 7:11pm
I never had that problem with the script, but I can vouch that I received two of your bulletins this morning. ;)
RobAC
Sun 20th May '01, 7:26pm
I'm not sure I understand why. I was talking to another vBulletin owner this morning that is also using the script and several of his members complained of the same problem.
GMTalk
Sun 20th May '01, 9:21pm
Hey,
I was talking to RobAC this morning. I am having this problem with my install as well. I have some that are subscribed that say they did not receive and I have others that got 2 copies. I only released one this morning as a test.
I am not sure what was going on, but I am getting the same problems that RobAC has stated as far as duplicates. I myself received 2 copies and my email is only listed once.
tamarian
Mon 21st May '01, 12:14am
My users love this hack! Thanks Kier, Kevin.
I have a suggestion for next version if you are entertaining any :)
1. Save the last used options in the database, so admin has to only change the date. If you have many forums, it can be tedeous, and might miss some of those private or test forums.
2. When the last run of emails is over, redirect back to panel, or change the submit button from "continue next xxx). Once you get used to clicking for next page, you migh send users in the last page twice.
Better yet, make it act like thread insed updates, where you set the max number of emails per run, and it'll go till done. :)
tubedogg
Mon 21st May '01, 9:05am
Originally posted by tamarian
2. When the last run of emails is over, redirect back to panel, or change the submit button from "continue next xxx). Once you get used to clicking for next page, you migh send users in the last page twice.
If you are seeing a "continue" button, you have not completed all emails that you want to send. The very last page should just have a link to go back to the index page.
tamarian
Mon 21st May '01, 10:39am
Originally posted by tubedogg
If you are seeing a "continue" button, you have not completed all emails that you want to send. The very last page should just have a link to go back to the index page.
Not on my forum. I have about 600 users and set it to send 500, next page should be the last one, but it still shows the "continue" button. I actually did press for a second time for the remaining 100+ and it still asked me to press continute when it was done.
tubedogg
Mon 21st May '01, 2:31pm
Did you upgrade to the latest version? (Download the file in the first post.)
tamarian
Mon 21st May '01, 2:39pm
Originally posted by tubedogg
Did you upgrade to the latest version? (Download the file in the first post.)
No, will do, mine is 0.95 :)
tubedogg
Mon 21st May '01, 2:54pm
See, there ya go! :) I fixed that bug.
Maverick1236
Wed 23rd May '01, 12:16am
im missing the admin cp portion of this hack-so i dont see it in cp
RobAC
Wed 23rd May '01, 12:38am
The instruction to add the admin cp link are in the download. Do you have the latest download?
The_Sisko
Thu 24th May '01, 2:20pm
Hey tubedogg,
can you post only the changed code from 0.96 to 0.97. I've hacked your hack a lot and translated it to german, so I don't want to do anything again.
Just give me a hint where to look, and I can upgrade my version of it.
Thanks
TwiZteR
Fri 25th May '01, 5:32am
this works great on my board, tnx for the hack Kier _and_ for the update tubedogg ;)
jojo85
Sat 26th May '01, 7:40am
Erf
this script don't work by me..
here is the error:
Database error in vBulletin Control Panel: Invalid SQL: SELECT * FROM user WHERE SUBSTRING(birthday,6)>='05-26' AND SUBSTRING(birthday,6)<='06-09' ORDER BY SUBSTRING(birthday,6) LIMIT 0,10
mysql error: You have an error in your SQL syntax near 'SUBSTRING(birthday,6) LIMIT 0,10' at line 1
mysql error number: 1064
Date: Saturday 26th of May 2001 12:33:55 PM
Script: /forums/admin/commbull.php
Referer: http://www.agnfr.com/forums/admin/commbull.php?s=
Help me plz
The_Sisko
Sat 26th May '01, 9:12am
Turn Birthdays to 0!!!
Your mysql version is not up to date and doesn't support SUBSTRING!
jojo85
Sat 26th May '01, 9:19am
Thx you
jojo85
Sat 26th May '01, 9:32am
That work now :p
Thx you very much guy!!
RobAC
Sat 26th May '01, 1:37pm
I'm still having a problem getting the email to appear properly formatted. I've tried wluke's suggestion in this thread: http://www.vbulletin.com/forum/showthread.php?s=&threadid=16396
but it still doesn't work. Where is the correct location to place the line of code he is talking about?
tubedogg
Sat 26th May '01, 3:32pm
Originally posted by The_Sisko
Just give me a hint where to look, and I can upgrade my version of it.
OK :) Changes between .96 and .97:
line 140, replace
while ($group = $DB_site->fetch_array($groups)) { makeyesnocode($group[title],"group[$group[id]]",1); }
with
while ($group = $DB_site->fetch_array($groups)) { makeyesnocode($group[title],"group[$group[id]]",0); }
line 145, replace
makeyesnocode("Create a new thread with a copy of your email in your forums?","postcopy");
with
makeyesnocode("Create a new thread with a copy of your email in your forums?","postcopy",0);
on line 505, delete
$passmessage = trim($message);
and then add
$passmessage = trim($message);
right below
$message = str_replace("}","",$message);
line 507, replace
if ($page = 1) {
with
if ($page == 1) {
That should be it. :)
The_Sisko
Sat 26th May '01, 4:07pm
Thanks a lot, I'll try it later!
tubedogg
Sat 26th May '01, 5:54pm
Originally posted by RobAC
Where is the correct location to place the line of code he is talking about? [/B]
right below
$message = str_replace("\\'","'",$message);
julius
Sat 26th May '01, 6:01pm
How can I change last post time to -> server time + 6 hours (GMT+1)?
Thanks :)
tubedogg
Sat 26th May '01, 6:05pm
The time will be displayed as whatever you set in your User CP - the server time is automatically adjusted by vB.
julius
Sat 26th May '01, 6:25pm
In Admin CP I have:
Time Zone Offset
Time (in hours) that the server is offset from GMT. = GMT -5 hours
In My User CP I have: GMT +1 (Central Europe)
The last post time in the Community bulletin is GMT -5.
Don't know way. :(
RobAC
Sat 26th May '01, 6:54pm
Originally posted by tubedogg
right below
$message = str_replace("\\'","'",$message);
I can't find that line in the commbull97.php file at all.
tubedogg
Sat 26th May '01, 7:01pm
That's because vB removed the two backslashes.
Try this
$message = str_replace("\\'","'",$message);
EXCHANGE
Sun 27th May '01, 1:46am
First of all: Great Hack :D
But I had a problem when letting the Script create a new Thread. Actually my "News and Announcements" Forum is moderated, so I´m getting this Error when trying to use the "Create Thread" function in the bulletin mailer. The thread and post tables are updated correctly, but updating the forum table causes a problem.
chrispadfield
Wed 30th May '01, 7:42am
I am getting this SQL error:
<!-- Database error in vBulletin Control Panel: Invalid SQL: SELECT * FROM user WHERE SUBSTRING(birthday,6)>='05-30' AND SUBSTRING(birthday,6)<='06-13' ORDER BY SUBSTRING(birthday,6) LIMIT 0,10
mysql error: You have an error in your SQL syntax near 'SUBSTRING(birthday,6) LIMIT 0,10' at line 1
mysql error number: 1064
Date: Wednesday 30th of May 2001 02:19:18 AM
Script: /forums/admin/commbull.php
The_Sisko
Wed 30th May '01, 8:48am
@chrispadfield:
Originally posted by The_Sisko
Turn Birthdays to 0!!!
Your mysql version is not up to date and doesn't support SUBSTRING!
@tubedogg:
I've tested it and it works!
chrispadfield
Wed 30th May '01, 10:22am
arr. ok thank you.
Santa
Wed 30th May '01, 12:08pm
I get this error after I tried to send the mails out.
Could not execute mail delivery program in /homepages/31/d11193551/htdocs/forum/admin/commbull.php on line 541
any tips for me ??
Santa
etones
Thu 31st May '01, 9:35am
great hack.. hats of the both kiew and tubedogg.
One possibility... can you add the automaric javascript forwarding thing when sending out?
Cheers
Blue2000
Thu 31st May '01, 1:17pm
this is great works very well on my board, installed without any problems (then again how could you have problems with such an easy way to install)
Well done to both of you, i know for one i will be using this hack.
There is one little thing tho it auto picks up your url, but i dont what a Dlink to the board i want to put my main domain name in as i have phpnuke running on my site, is there anyway to do this in the next ver maybe? or tell me know i can do that now?
Thanks and great work dudes
Pingu
Thu 31st May '01, 8:41pm
More errors for me. I already had to set birthdays to 0 and now this one pops up (commbull097):
Database error in vBulletin Control Panel: Invalid SQL: UPDATE user SET WHERE
userid='1'
mysql error: You have an error in your SQL syntax near 'WHERE userid='1'' at line 1
mysql error number: 1064
The line I found in commbull is, I think:
$d = $DB_site->query("UPDATE user SET ".iif($foruminfo[countposts],"posts=posts+1","")." WHERE userid='$id[id]'");
So, what's this? More version misery?
tubedogg
Thu 31st May '01, 8:44pm
mmm...I didn't really think that one one through. I'll fix it up hopefully by this weekend.
Eficrx
Fri 1st Jun '01, 11:29am
cant wait to add it when its fixed !!!:D
tubedogg
Sun 3rd Jun '01, 1:28am
I updated the script so it fixed that stupid bug. Sorry I didn't think about that before. :o
RobAC
Sun 3rd Jun '01, 1:32am
oh NOW you update the script Kevin....after I just downloaded the old version again and made the script change to correct the email formatting problem....which still didn't work. Great timing Kev! :D :D :D
supernut
Sun 3rd Jun '01, 1:24pm
the install worked but then when you go to send this happens, the output is posted in the forum but thats it, no emails are sent ?
--------CUT----------
Database error in vBulletin Control Panel: Invalid SQL: UPDATE user SET 'posts=posts+1' WHERE userid='1'
mysql error: You have an error in your SQL syntax near ''posts=posts+1' WHERE userid='1'' at line 1
mysql error number: 1064
Date: Sunday 03rd of June 2001 12:22:17 PM
--------CUT--------
Eficrx
Sun 3rd Jun '01, 1:30pm
i just installed it . Everything works even tested it by sending emails out.
tubedogg
Sun 3rd Jun '01, 1:32pm
Fixed. Download the zip file and reupload commbull.php.
cobradude
Sun 3rd Jun '01, 2:52pm
tubedogg & Kier, thank you for this hack! It's awesome!!!
supernut
Sun 3rd Jun '01, 3:45pm
WOW.... great fix
Sinema
Mon 11th Jun '01, 2:20am
This looks great and I can't wait for it to work but I got this error and I do not know enough about mySQL or php to figure where it came from
After installing the hack and setting up the preferences .. I clicked the okay or whatever and it sent me this error
Database error in vBulletin Control Panel: Invalid SQL: SELECT * FROM user WHERE SUBSTRING(birthday,6)>='06-10' AND SUBSTRING(birthday,6)<='06-24' ORDER BY SUBSTRING(birthday,6) LIMIT 0,10
mysql error: You have an error in your SQL syntax near 'SUBSTRING(birthday,6) LIMIT 0,10' at line 1
mysql error number: 1064
Not sure what to do to fix it..
tubedogg
Mon 11th Jun '01, 3:19am
Set birthdays to 0.
aldamon
Mon 11th Jun '01, 2:23pm
Thank you thank you thank you!
This hack rules!!!
amykhar
Mon 11th Jun '01, 2:59pm
I love watching who's online after I send out the weekly bulletin. People that I thought had died show up on the board and poke around.
Thanks for this great hack. :)
Now, I can't resist picking on you a little bit and asking for this hack to be upgraded so that it maintains the settings (the forums not to include, how many threads to include, etc.) so that all I have to do is tell it to send once a week.
Amy
KeithMcL
Thu 14th Jun '01, 8:53am
When I try previewing the mail I get the database error.
Anyone got any ideas?
Tiss ok, I see the post above about it. Thanks
Joe
Sun 17th Jun '01, 10:38pm
Im having problems with the Threads posted most recently option, im showing the first few threads posted, not the last threads posted. Is this a v.98 bug, or am i using this wrong? :)
Byron
Mon 18th Jun '01, 12:20am
- Will adding the new field to user database cause any conflict in future vb release?
- Just in case if we do not want to use this script after adding the new field to user database, how do we revert back any changes to the database?
- Hope that hack will appear in the next vb release.
Cold Steel
Mon 18th Jun '01, 1:36am
This is great.
Thanks!!!!
tubedogg
Mon 18th Jun '01, 2:06am
Originally posted by Byron
Will adding the new field to user database cause any conflict in future vb release?Not unless this hack becomes part of vB itself, in which case Kier or I (or somebody) will try to make sure that some sort of contingency exists for those that already installed it.
Just in case if we do not want to use this script after adding the new field to user database, how do we revert back any changes to the database?DROP receivebulletin FROM user;
Run that query from telnet or phpMyAdmin.
Hope that hack will appear in the next vb release.Maybe. ;)
Byron
Mon 18th Jun '01, 2:38am
Thanks tubedogg!
VirtueTech
Wed 20th Jun '01, 12:42pm
The hack installed great, but when ever I try and run the hack...it timesout.....I have over 150 forums, maybe that is why.
Too bad...I really want to use it. :(
tubedogg
Thu 21st Jun '01, 8:17am
Does it timeout after the first screen or when going to send emails?
Dave#
Thu 21st Jun '01, 7:11pm
ooops - ignore
mjames
Thu 21st Jun '01, 11:58pm
Kevin,
Thanks for this wonderful hack. I went through all the steps and got to the part where I can specify when it goes out, to who, etc., but I got the "There seems to have been a slight problem with the database..." error and this e-mail:
Database error in vBulletin Control Panel: Invalid SQL: SELECT * FROM user WHERE SUBSTRING(birthday,6)>='06-21' AND SUBSTRING(birthday,6)<='07-05' ORDER BY SUBSTRING(birthday,6) LIMIT 0,10
mysql error: You have an error in your SQL syntax near 'SUBSTRING(birthday,6) LIMIT 0,10' at line 1
mysql error number: 1064
Date: Thursday 21st of June 2001 10:51:46 PM
Script: /community/boards/admin/commbull.php
Referer: http://www.sports-central.org/community/boards/admin/commbull.php
Any idea? Thanks!
tubedogg
Fri 22nd Jun '01, 4:04am
Unfortunately that's a limitation of some older versions of MySQL that don't allow sorting by substring. For right now the workaround is to set birthdays to 0 and not send them until I can figure out some other way to do it. :(
Dave#
Fri 22nd Jun '01, 6:58am
Damn I am having problems:
I have set the comm to only use data from the 1st of June onwards but look at the dates in this snip from the preview.
NB dates are in European format date:month:year
Title: "Bruce is New Manager!!!" (posted 05-06-2003 by CM_Addicted)
o 249 replies, 575 views, last post: 09:41 AM, 31-05-2001 by DiscoDaveyf
o http://forums.cpfc.org/showthread.php?s=&threadid=8875
Title: "One word answer; Who would you like to take over from AS??" (posted 05-03-2002 by Eddie McGoldrick's tash)
o 217 replies, 17 views, last post: 07:00 PM, 15-05-2001 by BJ
o http://forums.cpfc.org/showthread.php?s=&threadid=8701
Title: "Redundancies" (posted 03-01-2003 by BarryBee)
o 207 replies, 0 views, last post: 11:00 PM, 25-03-2001 by wedgetail
o http://forums.cpfc.org/showthread.php?s=&threadid=7444
Title: "Jordan has seen enough" (posted 03-12-2001 by ruediger)
o 207 replies, 0 views, last post: 03:11 PM, 12-03-2001 by Bintang
o http://forums.cpfc.org/showthread.php?s=&threadid=7195
Title: "Fans Forum" (posted 05-12-2001 by GreatGonzo)
o 198 replies, 24 views, last post: 01:34 PM, 12-05-2001 by GreatGonzo
o http://forums.cpfc.org/showthread.php?s=&threadid=8660
Title: "Why I'm an eagle" (posted 09-05-2002 by Dave)
o 189 replies, 522 views, last post: 02:51 PM, 18-06-2001 by SAMO*
o http://forums.cpfc.org/showthread.php?s=&threadid=1952
Title: "Supporters of Austin & Harrison" (posted 02-09-2001 by fieldy)
o 164 replies, 0 views, last post: 12:50 AM, 10-02-2001 by Tarby
o http://forums.cpfc.org/showthread.php?s=&threadid=6699
Title: "One word (two if necessary) to describe how you feel at the moment" (posted 04-06-2003 by markholmes1991)
o 160 replies, 12 views, last post: 10:31 PM, 30-04-2001 by Mr_Optimistic
o http://forums.cpfc.org/showthread.php?s=&threadid=8259
Title: "Alan Smith - a correction" (posted 04-08-2002 by James)
o 158 replies, 5 views, last post: 02:58 PM, 20-04-2001 by Wandering Seagull
o http://forums.cpfc.org/showthread.php?s=&threadid=7909
Title: "Jordan's latest folly?" (posted 02-08-2001 by James)
o 158 replies, 0 views, last post: 11:39 PM, 08-02-2001 by JohnA
o http://forums.cpfc.org/showthread.php?s=&threadid=6694
tubedogg
Fri 22nd Jun '01, 7:08am
Double-check that you have "Only include threads that have been started or replied to since this date?" set to Yes. It is set to No by default.
Dave#
Fri 22nd Jun '01, 7:16am
heynurse
Sat 23rd Jun '01, 2:01am
this is an awesome hack!!!! Kudos! Thanks a million!!
Joe
Sat 23rd Jun '01, 2:11am
Anyone haveing date problems with "Threads posted most recently"?
look at my dates:
Title: "Heya, where is everyone from?" (posted 01-18-38 by SnoTurtle)
o 0 replies, 68 views, last post: 01:41 AM, 10-28-99 by SnoTurtle
o http://216.215.238.193/showthread.php?s=&threadid=2
Title: "Administrative Test Post" (posted 01-18-38 by donco)
o 0 replies, 58 views, last post: 08:12 AM, 03-13-00 by donco
o http://216.215.238.193/showthread.php?s=&threadid=3
Title: "Training / riding groups in Kuala Lumpur" (posted 01-18-38 by chrisbeddows)
o 1 replies, 67 views, last post: 02:23 PM, 05-15-00 by Joe Gardner
o http://216.215.238.193/showthread.php?s=&threadid=5
These are all old UBB threads that were coverted to vB forumat in version 1.12...
tubedogg
Sat 23rd Jun '01, 5:07am
OH you didn't mention that! :) That I have a fix for...somewhere around here...umm let me find it.
*runs off to find it*
*runs back*
OK I got it. This is not my script being wrong. :D It is the way vB imports/imported UBB threads. So here's the deal: rename this to fixubbdate.php, upload it to your admin directory, [important step] backup your database [/important step] and then run it by going to it in a browser.
That should fix your dates and make it so the script selects them correctly. The basic idea of why it doesn't work is the old import script gave the threads dates 30+ years in the future...which means when selected by date those come first. :)
Upon further inspection I realized that Joe, not Dave, posted the second message. so the "oh you didn't mention that" doesn't apply but I can only assume that Dave's was imported too...(at least I can hope - then it means there's nothing wrong with my script :D).
Dave#
Sat 23rd Jun '01, 5:22am
Kevin - Yes mine is a UBB import too-
Off to test the script
oops
Parse error: parse error, expecting `T_VARIABLE' or `'$'' in /home/cpfc/www/forums/admin/fixubbdate.php on line 15
tubedogg
Sat 23rd Jun '01, 5:54am
*doh* I thought I fixed that last time I posted this script...anyway replace line 15 (which is currently
if ($i = $50) {with
if ($i = 50) {
sorry :(
teenfront
Sat 23rd Jun '01, 6:47am
Hi I installed this script with no problem and I did with the welcome message script. However although it says messages sent to user@domain.com and no error messages appear it does not actually send the email when i test it.
Pleae help!
I don't think it is a problem with this script but something to do with the server or database is this possible.
Cheers,
Nick
MApI
Sat 23rd Jun '01, 1:35pm
With my 2.0.1 works great ! Thx.
bye
Joe
Sat 23rd Jun '01, 1:56pm
Nice! The fix ubbdate work great, i can new use the hack! :) In the future, i would like to see a "set preferences" section, where we can set what we sent out, so we dont have to configure the email each time, also if it sent every thing out by itself (cron?) that would be dandy... :) Good job.
express
Sat 23rd Jun '01, 4:41pm
Just installed into version 2.0.1 took about 15 minutes was very easy . Worked without any errors. I have been using a mailing list from mailman and this is alot easier and better. Will this also send data from a locked forum? I hope so that way I can use the locked forum to write messages to members and than lock it back just for me to update on a weekly basis.
Kier/Tubedoog
Thanks Again
:cool:
BenchRacer
Mon 25th Jun '01, 11:21am
This is a database error I get if I send the bulletin to all my users. It appears to mail out to everyone but it doesn't update the database.
Database error in vBulletin Control Panel: Invalid SQL: INSERT INTO adminlog (adminlogid,userid,dateline,script,action,extrainf o) VALUES (NULL,'1',993477634,'commbull.php','sent bulletin','')
mysql error: MySQL server has gone away
mysql error number: 2006
Date: Monday 25th of June 2001 10:00:34 AM
Script: /admin/commbull.php
If I send it out to a group that only has one user in it, it works flawlessly.
Any ideas?
Chad
Kier
Mon 25th Jun '01, 12:56pm
Originally posted by tubedogg
*doh* I thought I fixed that last time I posted this script...anyway replace line 15 (which is currently
if ($i = $50) {with
if ($i = 50) {
sorry :( Shouldn't that be
if ($i==50) {?
VirtueTech
Tue 26th Jun '01, 5:25am
Hello tubedogg,
The script times out for me when I try and send the actual email to a usergroup.
any ideas?
tubedogg
Tue 26th Jun '01, 9:27am
Originally posted by Kier
Shouldn't that be
if ($i==50) {?
:o :o :o Yes.
tubedogg
Tue 26th Jun '01, 9:29am
Originally posted by VirtueTech
Hello tubedogg,
The script times out for me when I try and send the actual email to a usergroup.
any ideas?
How many are you trying to send at once? Maybe decrease that number?
VirtueTech
Tue 26th Jun '01, 11:56am
I tried just sending it to the Admins only...but that didn't work. There are only 3 admins in the "Admin Usergroup"
It must have something to do with the amount of forums or something.
Any other ideas...I'd really love to use this hack. :)
tubedogg
Tue 26th Jun '01, 11:58am
The number of forums shouldn't affect it - by the time you get to the sending screen, it's done gathering info.
Or do you mean it times out when trying to go to the preview screen?
jarvis
Tue 26th Jun '01, 12:25pm
Not sure if I've missed this in the thread somewhere, but are there plans (or does it already and I'm overlooking) for this to mail automagically on a pre-specified basis?
Thanks, love the hack!!
VirtueTech
Tue 26th Jun '01, 12:56pm
Oh I didn't realize it was a preview....yes it times out when it tries to preview it.
express
Fri 29th Jun '01, 8:10pm
I have installed and ran for 2 weeks. Hack is great. One question though. When setting info to send out torwards the end you have a option to start a new thread with your email address in it. You put the username in to tell everyone who posted it also input the forum number where you want the new thread to appear. I did this both weeks but the thread never shows up in the mailing list that is sent out or in the forum. Everything else works fine.
Any idea's?
Joey
express
Sat 30th Jun '01, 1:43pm
anybody?
express
Sat 30th Jun '01, 4:19pm
I have list working now and also putting a copy of the email in the forum, but there is a question.
My first forum has 2 topics, the first is new/outages/ect.
the second is vbulletin 2.0
I choose to place email in forum 1. and it does but it places it under vbulletin the second optuin, how to I make it place under the first subforum of the first forum instead of the second subforum?
Joey
mjames
Mon 2nd Jul '01, 4:55pm
Originally posted by tubedogg
Unfortunately that's a limitation of some older versions of MySQL that don't allow sorting by substring. For right now the workaround is to set birthdays to 0 and not send them until I can figure out some other way to do it. :(
Do you mean it will work if I set birthdays to 0 or it won't work at all for me with that error? Just wishing I could get this to work. :(
tubedogg
Tue 3rd Jul '01, 1:32am
I mean if you set birthdays to 0 it will work but without birthdays.
mjames
Wed 4th Jul '01, 2:27am
Originally posted by tubedogg
I mean if you set birthdays to 0 it will work but without birthdays.
Oh, cool, great! Something's better than nothing - thanks.
mjames
Thu 5th Jul '01, 1:56am
I attempted to send out my Community Bulletin today. It sent it out to the first 76 people out of about 350 and then gave me this error:
Fatal error : Allowed memory size of 8388608 bytes exhausted (tried to allocate 9847 bytes) in /home/mjames86/sports-central-www/community/boards/admin/commbull.php on line 540
What's this?
JJR512
Fri 6th Jul '01, 1:10am
Just a quick guess, but maybe you tried to send to too many people at once. Try reducing the number of emails sent at one time. Once you set the initial options, and click on Preview Mailing, down at the bottom is a setting for Mails to send at once. By default, it is set to 500. Trying to generate and send 500 emails all at once may be a bit much for the particular server you're on, especially if your bulletin is larger than normal. Try setting it to maybe 100 users, and see if it works. It will take longer to complete the process, but at least you would be able to complete it.
mjames
Fri 6th Jul '01, 1:12am
Originally posted by JJR512
Just a quick guess, but maybe you tried to send to too many people at once. Try reducing the number of emails sent at one time. Once you set the initial options, and click on Preview Mailing, down at the bottom is a setting for Mails to send at once. By default, it is set to 500. Trying to generate and send 500 emails all at once may be a bit much for the particular server you're on, especially if your bulletin is larger than normal. Try setting it to maybe 100 users, and see if it works. It will take longer to complete the process, but at least you would be able to complete it.
Thanks! I will try that next time. Thanks for putting that error in plain English.
mjames
Fri 27th Jul '01, 11:51pm
Kevin,
I noticed a small error in the e-mail text. You spelled "receive" wrong at the bottom. :)
datman99
Mon 30th Jul '01, 11:35am
I'm a lil dizzy after reading this thread....can ya clear up what .zip file I actually need to download?
Q: is it: commbull98.zip at the begining of this thread? I'm gonna wipe my VB clean and install VB 2.0...as I have a corrupt database and get errors when I try the upgrade scripts on my: vBulletin Version 2.0.0 Release Candidate 2.
Help
:confused:
Pingu
Mon 30th Jul '01, 5:54pm
The .zip file in the first message has been updated every time. Besides, there isn't another one in this thread, so that's the one you want :)
datman99
Thu 2nd Aug '01, 3:32pm
At first when I installed it, I got this error:
----------------------------------
There seems to have been a slight problem with the database. Please try again by pressing the refresh button in your browser.
An E-Mail has been dispatched to our Technical Staff, who you can also contact if the problem persists.
We apologise for any inconvenience.
-----------------------------------
But then I turned the Brithdays annd Calendar stuff to 0 and it worked like a charm Whew! I'm gonna have some fun now..
Thanks:)
Tarion
Mon 6th Aug '01, 2:12pm
Hello, is a very good hack,
but i have some problems with the inclution of some code in members.php and index.php. All of this code i don't finde in the two files. waths happends???
then find this:
$pmpopup=iif($pmpopup=="yes",1,0);
and after it add this
$receivebulletin=iif($receivebulletin=="yes",1,0);
and finally find this
$DB_site->query("UPDATE user
SET ".$updatestyles."adminemail='$adminemail',
and replace it with this:
$DB_site->query("UPDATE user
SET ".$updatestyles."adminemail='$adminemail', receivebulletin='$receivebulletin',
--------------------------------------------------------------------------------
admin/index.php
You will need to make the following alterations to your admin/index.php file:
After this:
<a href="email.php?s=<?php echo $session[sessionhash]; ?>"> Email users </a><br>
add this:
<a href="commbull.php?s=<?php echo $session[sessionhash]; ?>"> Send Community Bulletin </a><br>
I hope you can help me.
PS. I can open the file commbull.php an send mails to all users, but i didn't see the link in the cp.
Tarion
Mon 6th Aug '01, 2:20pm
i was to stupid to find the code, but at the moment i see it.
THX
Steve_C
Tue 7th Aug '01, 6:57am
Does this work on 2.0.3 ?
tubedogg
Tue 7th Aug '01, 7:03am
Yes.
Tarion
Tue 7th Aug '01, 8:14am
perfektly it's a very good Hack and it works fine with V2.0.3
Steve_C
Tue 7th Aug '01, 8:28am
I just got this when trying to run commbull.php:
Fatal error: Call to undefined function: cpheader() in /usr/www/users/gandalf/starwarsguide.com/forums/commbull.php on line 6
tubedogg
Wed 8th Aug '01, 4:01am
You have to put commbull.php into your admin directory.
bob_pitbull
Wed 8th Aug '01, 4:46am
At the moment I'm just toying around with vBulletin, seeing what it can do etc, before putting it live (same thing can be said for my whole website actually), so I found the following error when I tried Previewing my "community bulletin"..
"Database error in vBulletin Control Panel: Invalid SQL: SELECT * FROM user WHERE SUBSTRING(birthday,6)>='08-08' AND SUBSTRING(birthday,6)<='08-22' ORDER BY SUBSTRING(birthday,6) LIMIT 0,10
mysql error: You have an error in your SQL syntax near 'SUBSTRING(birthday,6) LIMIT 0,10' at line 1
mysql error number: 1064
Date: Wednesday 08th of August 2001 12:49:23 PM
Script: /forum/admin/commbull.php
Referer: http://www.dogwalks.org/forum/admin/commbull.php?"
If I set the number of birthdays to display to zero then it works... so I suspect that the problem is something like that there aren't 10 users subscribed to my forum, so therefore it's not gonna find 10 birthdays - 10 seems to be the default value for birthday output...
Just a minor error, doubt most people would see it, but thought you might like to know anyway.
Looking forward to using the community bulletin feature when I go live with the site :-).
tubedogg
Wed 8th Aug '01, 6:10am
Actually, read up a few posts. :) Your version of MySQL does not support SUBSTRING, or does not support using SUBSTRING in a where clause.
Setting it to 0 eliminates using birthdays and therefore solves the problem.
Steve_C
Wed 8th Aug '01, 8:49am
Thanks tubedogg! I must've overlooked that step.
bob_pitbull
Wed 8th Aug '01, 12:06pm
Ah, i see! Is that something I should talk to my isp about? Does that mean they're using an older version of SQL?
centris
Wed 8th Aug '01, 4:55pm
Did a test post to myself and worked fine, tried a post to all members and got this:
Database error in vBulletin Control Panel: Invalid SQL: UPDATE forum SET replycount=replycount+1,threadcount=threadcount+1, lastpost='997310960',lastposter='warrior' WHERE forumid IN ()
mysql error: You have an error in your SQL syntax near ')' at line 1
mysql error number: 1064
Date: Wednesday 08th of August 2001 11:49:20 PM
Script: /forum/admin/commbull.php
Referer: http://www.******.co.uk/forum/admin/commbull.php
I have the entry in my CP and I turned birthdays etc. to 0
Also getting this error when I try to enter my CP:
Parse error: parse error in /usr/home/c/a/******/public_html/forum/member.php on line 1291
any ideas.
Please disregard this post, was a syntax error in member.php (My Fault) all working as it should - great Hack TNX
The Realist
Wed 8th Aug '01, 6:22pm
Can someone please explane how to Install this because I cannot find the members, admin or index.php files in my forum.
Do I have to Install them via templates?
:rolleyes:
centris
Wed 8th Aug '01, 7:25pm
Originally posted by The Realist
Can someone please explane how to Install this because I cannot find the members, admin or index.php files in my forum.
Do I have to Install them via templates?
:rolleyes:
Your members.php is in the main forum folder, index.php is in the admin folder.
Download members.php, index.php(index.php from the admin folder) upload commbull.php to your admin folder and run from your browser. All the instructions will appear on screen. Give yourself some time to complete.
KeithMcL
Thu 16th Aug '01, 5:16am
Any chance you could add an extra feature to the community bulletin mail hack tubedogg?
The feature is the PM or email the admin/mods etc when it's time to send out the next mail with an option to set how often you wish to send out the mail?
This would be really appreciated!
VirtueTech
Thu 16th Aug '01, 6:38am
WHy not just run it via cron?
KeithMcL
Thu 16th Aug '01, 7:02am
Originally posted by VirtueTech
WHy not just run it via cron? Would that work? What if you wanted to change some of the settings for the mail like which threads and posts to include? I don't think it'd work.
Delhaze
Sat 18th Aug '01, 9:21pm
Just installed it, brilliant !!!
Minor "cosmetic" problem.
" are displayed as & quot in the email. (without the space).
Obviously ok when posted to forum.
Can you tell me what needs to be changed to get around this please.
ethank
Wed 22nd Aug '01, 12:14am
I think you forgot these lines at the top so it updates with prrogress:
$noheader=0;
$nozip=1;
LuBi
Sun 26th Aug '01, 12:28pm
Will this work for 2.0.3 and is the file updated and complete?
tpearl5
Mon 27th Aug '01, 3:16pm
This may have already been asked:
Is it possible to have the 'Allow Bulletin Board Administrators and Moderators To Send You Email Notices' revert to 'Yes' if the user selects 'Yes' for 'Receive Community Bulletin Email?' ?
Also, it would be cool to have the top x amount of posters and referral getters listed in the stat list. (or another new list)
I'm currently getting my host to update MySQL so I can send calendar and b-day updates. Figures, the cool stuff doesn't work!
Steve_C
Mon 27th Aug '01, 6:21pm
What about adding top referrals?
mjames
Mon 27th Aug '01, 8:41pm
Question: What is the best way to edit the mailing that shows up everytime you preview the mailing? I want to edit some things, such as the miss-spelling of "receive" so I don't have to edit it everytime I send it out.
Steve_C
Mon 27th Aug '01, 11:42pm
Originally posted by mjames
Question: What is the best way to edit the mailing that shows up everytime you preview the mailing? I want to edit some things, such as the miss-spelling of "receive" so I don't have to edit it everytime I send it out.
Simply go into commbull.php and search for whatever you want to fix and edit it. I even made certain options default to NO rather than yes. What I DO NOT like is how you do want to go back and make a change, it resets all the fields. :(
KeithMcL
Tue 28th Aug '01, 11:17am
Would it be possible to get another feature added to this hack to email the admin/mods of the forum the day the bulletin is due to be sent out?
Quick question also to those that use this hack, how often do you send out your community bulletin?
mjames
Tue 28th Aug '01, 11:17pm
Originally posted by KeithMcL
Quick question also to those that use this hack, how often do you send out your community bulletin?
I try to send out mine weekly... however, I am having a hard time, which brings me to another point.
Does anyone on a dial-up connection have trouble sending the Bulletin? When I try to send it out on the preview mailing screen, it stalls and takes FOREVER to load. I have reduced the number of users it sends to at a time (down to 30 from 500) and I have tried only sending it to one or two user groups at a time, still SLOOOOOOW. It takes all day to send out the Bulletin, as I let it load for 30 minutes at a time while I do other things. Am I alone? Is this a problem with my Internet connection or my host's MySQL server?
LuBi
Thu 30th Aug '01, 1:12pm
Can this hack work for 2.0.3?
Bane
Thu 30th Aug '01, 1:16pm
Works fine in 2.0.3
tpearl5
Thu 30th Aug '01, 2:26pm
Originally posted by tubedogg
Actually, read up a few posts. :) Your version of MySQL does not support SUBSTRING, or does not support using SUBSTRING in a where clause.
Setting it to 0 eliminates using birthdays and therefore solves the problem.
I contacted my host about this. They told me I have mySQL 3.22.32 running on my box and that it supports substring. Eh? What should I tell them?
tubedogg
Fri 31st Aug '01, 1:44am
There were apparently changes made to it in 3.23.3 and 3.23.7...which would lead me to believe that how I'm using it was not supported until one of those versions, which is higher than the version you are running.
express
Fri 31st Aug '01, 5:42pm
I installed this hack sometime back and had no problems with it.I have since installed vb 2.0.3. I haven't used it in a month or so. Today I ran the bulletin and everything went find, except I excluded some of the forums by selecting no to them and they still send out threads from those forums.
Any ideas what might be causing this.
postalbobo
Sun 2nd Sep '01, 5:28am
Absolutely beautiful hack, but it needs one key element:
Save the settings!!!
I can deal with manually sending it out, but having to go back and double check all my settings is a royal pain in the butt. Although, a small shell script to add to cron would be a very, very welcome addition.
LuBi
Sat 8th Sep '01, 2:57am
Yea I also would like to see a SAVE SETTINGS addon to htis hack, great job again though tube. Any chances on the addon :D
Steve_C
Sat 8th Sep '01, 10:10am
Me too! Save settings! Add referral information as well!
holev
Sat 8th Sep '01, 12:54pm
you know u guys can actualy do all this stuff yourself :rolleyes:
Steve_C
Sat 8th Sep '01, 1:12pm
If I knew how to write PHP, I would!
LuBi
Sat 8th Sep '01, 5:25pm
Same here. If I knew
Onyx06
Sat 8th Sep '01, 10:33pm
Now what would be great was if you could select in the admin control panel what stats you wanted in each issue. Whether it be posts, referrals, views, etc. Referrals is a must!!
LuBi
Wed 12th Sep '01, 9:51pm
I'm going to post in the request forum and we'll see if anyone wants to help us out here. Can you guys just post in here a list of features you would like to see. Thanks!
BradC
Wed 12th Sep '01, 9:57pm
when you say.. save settings (I have not downloaded or installed this yet) do you mean the settings for what is emailed out and everything.... ?
I would not personally think it would be all that tuff to do..
LuBi
Wed 12th Sep '01, 10:12pm
Well Brad not like what's sent. In this code there are setting you have to set before the mail goes out. We want to be able to make it so it remembers or saves these settings.
LuBi
Fri 14th Sep '01, 9:42pm
Just posted a request to add those save features to this hack. Tube please add this to your own hack to make things easier you do such a good job updating hacks. :D
http://www.vbulletin.com/forum/showthread.php?s=&threadid=28107
Can anyone addon to this hack Updated Community Bulletin Generator (http://www.vbulletin.com/forum/showthread.php?s=&threadid=16290&perpage=15&pagenumber=13) we need it badly. I would rather have tube himself do it but he hasn't answered any of our requests so it's out there for you guys. thanks from all of us who requested this addon to the hack.
http://www.vbulletin.com/forum/showthread.php?s=&threadid=16290
Steve_C
Mon 1st Oct '01, 11:46am
Another welcomed addition would be to make it easy to distinguish categories and forums. I have several categories with the same forum names (example would be general news for a toys section another classified section) but I don't want to include the classified section and it is hard to tell which is which. Is this written clearly?
;)
Afterburner
Thu 4th Oct '01, 8:48am
thx great hack, works fine in 2.0.3
Steve_C
Mon 8th Oct '01, 4:09pm
It's not saving the option for my users:
Change "receive community updates" from yes, to no.
FWC
Sat 13th Oct '01, 3:46am
What a great hack. I got home from work today and had an email from the Webmaster talking about site upgrades. Amongst other things he lamented the lack of a newsletter feature we used to have when we were on the now defunct Rivals network. I sent back an email telling him to give me a few minutes. Then I sent him a Community Bulletin. :D
Steve Machol
Sun 14th Oct '01, 3:06pm
I just got around to installing this hack Very nice job tubedogg!
I have one minor problem with dates though. Here's a excerpt from a test bulletin I sent:
Title: "TIPS ON DISPENSING" (posted 01-18-2038 by harry a saake)
o 238 replies, 2473 views, last post: 03:58 PM, 10-06-2001 by ph
o http://www.optiboard.com/forums/showthread.php?s=&threadid=1034
The posted date on this should actually be 10-29-2000. This exact date error (01-18-2038) is repeated for every thread that was originally started in my UBB forums prior to upgrading to vB.
Any idea how to fix this?
Steve Machol
Sun 14th Oct '01, 3:14pm
I found another problem in the statistics:
STATISTICS:
we have had the following activity since 10-01-2001
---------------------------------------------------------------------------
o 37 new members
o 1,866 new threads
o 577 new posts
o 3 new pollsThere are only 81 new threads so far this month - not 1866. The posts and members are correct though.
Steve_C
Mon 15th Oct '01, 5:20pm
Originally posted by SirSteve
It's not saving the option for my users:
Change "receive community updates" from yes, to no.
I think this is a pretty big bug! HELP!
Bald Bouncer
Mon 15th Oct '01, 9:43pm
tubedogg is it posible to adjust this for something I want to add to my board please :)
As this has the ability to post the contents of the Bullitin to a forum of your choice posted under your name I thought you might be able to help with this.
I would like as a new member joins a greeting post to be made in a selected forum IE:
WELCOME TO OUR NEW MEMBERS
The Xbox Forum Would Like To Welcome (name) On Behalf Of All The Current Members And Hope They Enjoy Their Stay etc......
Sorry if this is drifting off topic a bit but I think you are the man to help :D
Sukij
Tue 16th Oct '01, 12:10am
Hi..
What this error means ? How to fix it ? The error start happen everytime at record 26 onward.
Maneerat (Maneerat@nagase.co.th) .... ok
Wee Chai Peng (wee@nagase.com.my) .... ok
Rattawuth (rattawuth@nagase.co.th) .... ok
Kritsada (kritsada@nagase.co.th) .... ok
Benjapa (BENJAPA@NAGASE.CO.TH) ....
Warning: Server Error in D:\VBlite\upload\admin\commbull.php on line 542
ok
Pennipa (Pennipa@nagase.co.th) ....
Warning: Server Error in D:\VBlite\upload\admin\commbull.php on line 542
ok
Pongsawat (Pongsawat@nagase.co.th) ....
Warning: Server Error in D:\VBlite\upload\admin\commbull.php on line 542
ok
fluxin808
Thu 18th Oct '01, 6:25pm
Is there any way to send the bulletin automatically, as in weekly?
Steve Machol
Thu 18th Oct '01, 6:29pm
Still need help for my two problems posted above.
DarkReaper
Fri 19th Oct '01, 1:11am
It'd be nice to be able to have this run every X amount of days, automatically.
Also, bug fixes? :)
UtilityGeek
Wed 24th Oct '01, 7:36pm
I checked through all the replies and I don't think this was asked. What is the default value under member options for getting the community bulletin? If it is 'Yes' how would I go about changing it to 'No' as the default? Is it even possible?
christec
Thu 25th Oct '01, 6:57pm
If you would like to send out your Community Bulletin in a HTML format make these modifications to the commbull.php file.
(I hope that I am not stepping on the toes of the author who created this GREAT hack.)
Based on Community Bulletin Generator Version 0.98
Find:
$message = str_replace("\\'","'",$message);
Right After Add:
$message = str_replace("\r\n","\n<br>",$message);
----------------------------------
Find:
while ($user = $DB_site->fetch_array($users)) {
$username = $user[username];
$password = $user[password];
$posts = number_format($user[posts]);
$joindate = date($dateformat,$user[joindate]);
$lastactivity = date("$timeformat, $dateformat",$user[lastactivity]);
eval ("\$mailbody = \"".$message."\";");
echo "<li>".htmlspecialchars($username)." (<i>$user[email]</i>) .... ";
mail($user[email],$subject,$mailbody,"From: \"$bbtitle Mailer\" <$webmasteremail>");
echo "ok</li>\n";
//flush();
}
Replace With:
// Allow HTML in Community Bulletin - Start
while ($user = $DB_site->fetch_array($users)) {
$username = $user[username];
$password = $user[password];
$posts = number_format($user[posts]);
$joindate = date($dateformat,$user[joindate]);
$lastactivity = date("$timeformat, $dateformat",$user[lastactivity]);
eval ("\$mailbody = \"".$message."\";");
echo "<li>".htmlspecialchars($username)." (<i>$user[email]</i>) .... ";
$camEmailHeader = "From: \"$bbtitle Mailer\" <$webmasteremail>\n";
$camEmailHeader .= "Content-Type: text/html\n";
mail($user[email],$subject,$mailbody,$camEmailHeader);
echo "ok</li>\n";
//flush();
}
// Allow HTML - End
--------------------------------------------
You will need to insert HTML into the commbull.php file. You can also add HTML into the preview page. If you make these modifications be aware that the current hyper-links will no longer work unless you add the appropriate HTML tags.
Steve_C
Thu 25th Oct '01, 7:17pm
Am I the ONLY one that has the problem with it not removing e-mail addresses via the User CP when you do not want the community bulletin??
DarkReaper
Thu 25th Oct '01, 10:43pm
Would it be possible to have forums which are private marked as "No" in the "include these forums list" by default?
Steve_C
Fri 26th Oct '01, 1:16am
Originally posted by DarkReaper
Would it be possible to have forums which are private marked as "No" in the "include these forums list" by default?
Look through commbull.php until you find what you want to change and you'll see "checked> Yes <", change Yes to No.
Powered by vBulletin™ Version 4.0.0 Beta 2 Copyright © 2009 vBulletin Solutions, Inc. All rights