vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 2.x Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=4)
-   -   Updated Community Bulletin Generator (https://vborg.vbsupport.ru/showthread.php?t=16290)

tubedogg 05-08-2001 10:00 PM

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
Code:

<a href="email.php?s=<?php echo $session[sessionhash]; ?>"> Email users </a><br>
and right below it, add
Code:

<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 05-08-2001 11:13 PM

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 05-09-2001 04:14 AM

What exactly does this do, what's its purpose? Is there a demo?

tubedogg 05-09-2001 04:27 AM

<a href="http://www.vbulletin.com/forum/showthread.php?threadid=12366" target="_blank">http://www.vbulletin.com/forum/showt...threadid=12366</a>

Angelus_au 05-09-2001 07:12 AM

Great Hack to both Kier & tubedogg btw it does work with RC1

Dontom 05-09-2001 08:11 AM

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 05-09-2001 08:19 AM

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 05-09-2001 08:25 AM

...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 05-09-2001 08:39 AM

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
Code:

  if ($bbuserinfo[adminemail]) {
    $allowmailchecked="checked";
    $allowmailnotchecked="";
  } else {
    $allowmailchecked="";
    $allowmailnotchecked="checked";
  }

and right above it, add
Code:

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 05-09-2001 08:54 AM

Tubedogg,
thank you, works perfect now!
Call me Bugfinder
:D
Tom

RobAC 05-09-2001 09:03 PM

Tubedogg,

I assume that if I install this hack now, I'll have to re-hack this after each forum software upgrade, correct?

JJR512 05-09-2001 10:08 PM

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:
PHP Code:

<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 05-09-2001 11:53 PM

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
Code:

<a href="commbull.php?s=<?php echo $session[sessionhash]; ?>"> Send Community Bulletin >/a><br>
and replace it with
Code:

<a href="commbull.php?s=<?php echo $session[sessionhash]; ?>"> Send Community Bulletin </a><br>
Fixed. :) Thanks JJR.

tubedogg 05-09-2001 11:54 PM

RobAC: Yes, you will have to rehack member.php and admin/index.php, however they are minor changes.

tubedogg 05-10-2001 01:50 PM

I have updated the first post in this thread with new v0.95, which has new features as detailed in that post. :)

JJR512 05-10-2001 05:36 PM

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 05-10-2001 05:55 PM

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 05-10-2001 06:00 PM

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 05-10-2001 06:10 PM

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 05-10-2001 08:54 PM

Quote:

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 05-10-2001 09:16 PM

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 05-10-2001 11:11 PM

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 05-10-2001 11:13 PM

Quote:

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 05-10-2001 11:14 PM

Quote:

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 05-10-2001 11:17 PM

Quote:

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:
Quote:

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 05-10-2001 11:22 PM

Quote:

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 05-11-2001 08:41 AM

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 05-12-2001 12:10 PM

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 05-12-2001 12:13 PM

What version of MySQL is your host running?

-dloh-hammer 05-12-2001 12:52 PM

cant say it :(

is there a way to check the version online ?

tubedogg 05-12-2001 01:17 PM

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 05-12-2001 01:25 PM

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 05-12-2001 01:36 PM

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 05-12-2001 02:03 PM

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 05-12-2001 02:11 PM

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 05-12-2001 02:12 PM

Thanks!
I'm not ready to upgrade MySQL eventhough I would like to. But I'm too stupid for that :(

RobAC 05-12-2001 03:38 PM

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 05-13-2001 12:09 AM

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 for a script to fix the dates. (Backup your database FIRST!) Upload it your admin directory and run it.

RobAC 05-13-2001 03:58 AM

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.
Quote:

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 for a script to fix the dates. (Backup your database FIRST!) Upload it your admin directory and run it.


RobAC 05-13-2001 04:23 AM

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.


All times are GMT. The time now is 04:45 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.02247 seconds
  • Memory Usage 1,840KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (6)bbcode_code_printable
  • (1)bbcode_php_printable
  • (7)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete