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)

SirSteve 10-15-2001 07:20 PM

Quote:

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

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 10-16-2001 02:10 AM

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 10-18-2001 08:25 PM

Is there any way to send the bulletin automatically, as in weekly?

Steve Machol 10-18-2001 08:29 PM

Still need help for my two problems posted above.

DarkReaper 10-19-2001 03:11 AM

It'd be nice to be able to have this run every X amount of days, automatically.

Also, bug fixes? :)

UtilityGeek 10-24-2001 09:36 PM

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 10-25-2001 08:57 PM

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

$message str_replace("\\'","'",$message); 

Right After Add:
PHP Code:

$message str_replace("\r\n","\n<br>",$message); 

----------------------------------
Find:
PHP Code:

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

// 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.

SirSteve 10-25-2001 09:17 PM

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 10-26-2001 12:43 AM

Would it be possible to have forums which are private marked as "No" in the "include these forums list" by default?

aldamon 10-30-2001 06:15 PM

Is this built into 2.2.0???

tubedogg 10-31-2001 04:33 AM

No.

JJR512 11-01-2001 11:13 PM

Any ideas on completing the last step of the installation with 2.2.0:
Code:

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 believe this is the new line we're looking for:
Code:

makenavoption("Email Users","email.php?action=start","<br>");
I tried this as the new line below it:
Code:

makenavoption("Send Community Bulletin","commbull.php","<br>");
But that only gave me a 404 page in the right side of the CP.

MarkB 11-01-2001 11:46 PM

It shouldn't give you a 404 error if commbull.php is in your admin directory. I added something basically the same (although mine references commbull.php?s=, which I doubt makes any diff:)), and it worked fine...

Good luck :)

DarkReaper 11-02-2001 12:41 AM

Quote:

Originally posted by SirSteve


Look through commbull.php until you find what you want to change and you'll see "checked> Yes <", change Yes to No.

Nice try, but that won't work, because that's not the way the script is setup :)

I've tried changing the block of code that outputs the forums to this, but its not working correctly:

Code:

        maketableheader("Include Info From Forums...");
        makelabelcode("<b>Include info from the following forums:</b>","&nbsp;");
        $forums = $DB_site->query("SELECT * FROM forum WHERE allowposting=1 AND active=1");
        while ($forum = $DB_site->fetch_array($forums)) {
                $permission = $DB_site->query("SELECT canview FROM forumpermission WHERE forumid='$forum[forumid]' AND usergroupid=2");
                if($permission == 0)
                {
                        makeyesnocode($forum[title],"forum[$forum[forumid]]",0);
                }
                else
                {
                        makeyesnocode($forum[title],"forum[$forum[forumid]]",1);
                }
        }
        restarttable();

Any ideas? It always goes to the else part of the if statement.

JJR512 11-02-2001 03:59 AM

Quote:

Originally posted by MarkB
It shouldn't give you a 404 error if commbull.php is in your admin directory. I added something basically the same (although mine references commbull.php?s=, which I doubt makes any diff:)), and it worked fine...

Good luck :)

When I point to the link, I see in the status bar that the URL is correct: www.jjr512.com/forums/admin/commbull.php. And even though I didn't put in any s= part, the end of the URL, after what I just mentioned, is &s=. But it still results in a 404. The file is there; I used it to give me the installation instructions.

aldamon 11-02-2001 10:55 AM

Don't forget, the admin control panel is also coded differently now, so the find and replace code portion of the instructions will not work.

I'm sure tubedogg will hook us up. I just hope it's before my next update is due to go out ;)

orca 11-02-2001 11:02 AM

The correct syntax for the addition would be:

PHP Code:

makenavoption("Send Community Bulletin","commbull.php?action=info","<br>"); 

If you don't add the action command it will display a blank page. I tested it. It works on my site.

DarkReaper 11-02-2001 05:59 PM

Can someone help me with my problem plz?

christec 11-02-2001 10:16 PM

Quick thought: [DarkReaper]

if $permission == 0
It will pass the $value of 0 to the function makeyesnocode for each loop it makes, making the value = "No"

if $permission != 0
It will pass the $value of 1 to the function makeyesnocode for each loop it makes, making the value = "Yes"

It will not select between the two.

Right?

DarkReaper 11-02-2001 11:22 PM

That's what its supposed to do, but it never does the "no" code.

christec 11-03-2001 12:24 AM

This is what you need to add
After this:
$permission = $DB_site->query("SELECT canview FROM forumpermission WHERE forumid='$forum[forumid]' AND usergroupid=2");

Add this:
list($canview) = mysql_fetch_row($permission);

Change
if ($permission == 0)

To
if ($canview == 0)

Thats it

DarkReaper 11-03-2001 12:26 AM

Now everything is set to No instead of Yes. :(

christec 11-03-2001 12:37 AM

That's because all the canview fields are (probably) set to 0.

DarkReaper 11-03-2001 01:19 AM

I'm pretty sure my entire board isn't invisible to all users... :)

xug 11-03-2001 02:43 AM

Thanks to all of you ! I love this hack !

I have it running on my site with VB2.2.0 and have no major bugs found at all only one thing I would like to see a solution for or I missed it in this thread (sorry if I did).

What about the password that is been send with the user info, till now I have only tested it to my own account and see to my surprise that my password is a very long number ;)

Is there a solution for this problem ?

christec 11-03-2001 04:24 PM

[DarkReaper] --
OK I think this is it.

After:

while ($forum = DB_site->fetch_array($forums)) {

Add This:
$perms=getpermissions($forum[forumid],0,2);
if ($perms[canview]==0) {
makeyesnocode($forum[title],"forum[$forum[forumid]]",0);
} else { makeyesnocode($forum[title],"forum[$forum[forumid]]",1);
}

Guru 11-03-2001 07:38 PM

A couple of comments:

In the generated email, there is a line that tells how to use the UserCP to subscribe, but it doesn't match the actual entry in the CP (and receive is missing the "e").

Replace it with:
Code:

and change \"Receive Community Bulletin Emails?\" from yes, to no.
Second, I added a little description after the Entry in the UserCP
Code:

<smallfont>Selecting Yes subscribes you to our Community Bulletin Email.</smallfont>
Finally, the poll list seems to show one of my polls twice, once with a bogus threadid (always 100). I can't imagine what would cause that. If anyone has any ideas? I've looked at the query, and it appears to be correct.

Anyway, very nice job overall. I'm using it. Thanks much!

SirSteve 11-05-2001 01:41 AM

Quote:

Originally posted by Guru
A couple of comments:

In the generated email, there is a line that tells how to use the UserCP to subscribe, but it doesn't match the actual entry in the CP (and receive is missing the "e").

Replace it with:
Code:

and change \"Receive Community Bulletin Emails?\" from yes, to no.
Second, I added a little description after the Entry in the UserCP
Code:

<smallfont>Selecting Yes subscribes you to our Community Bulletin Email.</smallfont>
Finally, the poll list seems to show one of my polls twice, once with a bogus threadid (always 100). I can't imagine what would cause that. If anyone has any ideas? I've looked at the query, and it appears to be correct.

Anyway, very nice job overall. I'm using it. Thanks much!

I am confused by this. So this fixes the bug in the User CP where it removes the member from the community bulletin e-mail list?

Guru 11-05-2001 03:44 AM

My comment didn't fix that bug, if there was one. I just noticed that the wording didn't match the Community Bulletin name.

SirSteve 11-05-2001 04:52 AM

So the User CP receive community bulletin bug is not just me?

Guru 11-05-2001 05:59 AM

I haven't noticed that as a bug...

thewitt 11-05-2001 10:13 PM

Has anyone attempted to automate the running of this hack from a cron job by using snoopy? Looked promising, but I have not played with it yet.

-t

Prince 11-06-2001 06:40 PM

Quote:

Originally posted by smachol

I have one minor problem with dates though. Here's a excerpt from a test bulletin I sent:

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?

I am having this exact same problem! All threads that were started in my UBB get reported as being started in the year 2003.

Any ideas???

thewitt 11-06-2001 07:16 PM

Quote:

Originally posted by Prince


I am having this exact same problem! All threads that were started in my UBB get reported as being started in the year 2003.

Any ideas???

There's a fix for the UBB Date import problem in an earlier post in this thread by tubedog.

Steve Machol 11-06-2001 08:09 PM

[QUOTE]Originally posted by thewitt

There's a fix for the UBB Date import problem in an earlier post in this thread by tubedog.

Steve Machol 11-06-2001 08:15 PM

It didn't work with vB 2.2.0:

Quote:

Warning: Failed opening '/path_hidden/forums/admin/fixubbdate.php' for inclusion (include_path='') in Unknown on line 0

Prince 11-06-2001 08:27 PM

Save as ubbfixdate.php, upload to admin and run in browser.

(back-up your database first!!!)


PHP Code:

<?
require("./global.php");
if (!isset($action)) {
    echo("This script will correct the dates on threads which were imported from UBB5.4x. Make sure you backup your database before proceeding!<br>");
    echo("If you have a backup, <a href=\"fixubbdate.php?action=doconvert\">click here</a> to proceed.");
}
if ($action=="doconvert") {
  $threads=$DB_site->query("SELECT MIN(post.postid),post.dateline AS dateline,post.threadid AS id,thread.threadid FROM post,thread WHERE post.threadid=thread.threadid GROUP BY thread.threadid ORDER BY thread.threadid ASC");
  echo("Line inserted on purpose<br>Rows in result: ");
  echo(mysql_num_rows($threads));
  while ($thread=$DB_site->fetch_array($threads)) {
    $DB_site->query("UPDATE thread SET dateline='$thread[dateline]' WHERE threadid='$thread[id]'");
    echo(mysql_affected_rows());
    $i++;
    if ($i==50) {
        echo("Updated another 50 threads...continuing<br>");
        $i = 0;
    }
  }
} else {
  echo("Done.");
}
?>


Steve Machol 11-06-2001 08:35 PM

See my note above. The script did not work for me. :stupid:

Steve Machol 11-06-2001 08:39 PM

Never mind! It was a file permissions problem. I ran it but I'm not sure if it worked or not. I'll test it out.


All times are GMT. The time now is 03:20 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.01738 seconds
  • Memory Usage 1,858KB
  • 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
  • (8)bbcode_code_printable
  • (6)bbcode_php_printable
  • (7)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)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