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)
-   -   Community Bulletin Email Generator + HTML (https://vborg.vbsupport.ru/showthread.php?t=32129)

Prince 11-06-2001 03:17 PM

I did that, but when you edit a user in the CP it does not show up. It only shows when you go to your own profile.

patvdv 11-06-2001 04:08 PM

Lovely extension on a great hack but why not also add the obvious? Add another selection to the USER CP to indicate whether a user wants to receive the bulletin in either TXT or HTML format? And send the email out accordingly? :)

Prince 11-06-2001 04:19 PM

Quote:

Originally posted by christec
In the install instructions you will see this (add this field to the users cp)

modifyoptions template
You will need to add this code to an appropriate place in your modifyoptions template:

<tr>
<td bgcolor="#1C5780"><normalfont><b>Receive Community Bulletin Email?</b></normalfont></td>
<td bgcolor="#1C5780"><normalfont>
<input type="radio" name="receivebulletin" value="yes"$receivebulletinchecked> Yes
<input type="radio" name="receivebulletin" value="no"$receivebulletinnotchecked> No
</normalfont></td>
</tr>

Look at this screen shot of the CP:

Prince 11-06-2001 04:31 PM

I'm trying to create the e-mail to generate "most recently posted", and it is giving threads that are 2 months old.....?

christec 11-06-2001 04:39 PM

Add Receive Community Email Bulletin field to Admin CP, under "Edit User"

Here ya go :stoned:

Prince 11-06-2001 04:51 PM

okay, but what about the fact that the hack does not produce the correct dates?
It makes it quite useless. :confused:

christec 11-06-2001 05:10 PM

Quote:

Originally posted by Prince
I'm trying to create the e-mail to generate "most recently posted", and it is giving threads that are 2 months old.....?
The order that you put the thread blocks in and this option -
Reuse threads gathered for this block?
Will affect the output.

Prince 11-06-2001 05:47 PM

Quote:

Originally posted by christec


The order that you put the thread blocks in and this option -
Reuse threads gathered for this block?
Will affect the output.

I'm not sure what you mean....

All I am trying to do is one block (the first block) I put 10 and select "most recently posted". Using the date: 11-01-2001

It spits out threads that 2-3 months old, and I mean threads that have not been replied to for 2-3 months.

AND it is saying that some posts were posted in the year 2003!...which is what seems to be the problem.

Any ideas????

Prince 11-06-2001 08:30 PM

Save as ubbdatefix.php, upload to admin directory 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:34 PM

Did it work for you? I got:

Quote:

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


All times are GMT. The time now is 12:38 AM.

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.02048 seconds
  • Memory Usage 1,738KB
  • 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
  • (1)bbcode_php_printable
  • (4)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
  • (10)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