vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.0 Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=33)
-   -   Automatic Birthday Thread (https://vborg.vbsupport.ru/showthread.php?t=62613)

Rick 06-12-2004 03:53 AM

Nice hack.

I have it installed and working, but I am seeing all of the HTML code surrounding the birthday people. Does HTML have to be enabled in the forum for this to work properly?

Also, what do I need to do to change the subject of the thread. I have LOTS of members and having all of the user names in the subject line is way too much clutter.

Thank you.

Rick

ChurchMedia 06-16-2004 07:04 AM

Quote:

Originally Posted by Rick
Nice hack.

I have it installed and working, but I am seeing all of the HTML code surrounding the birthday people. Does HTML have to be enabled in the forum for this to work properly?

I guess so. The other option is to take out the HTML and forgo the links to their profiles. I think you could use /n for line breaks (???).

Quote:

Originally Posted by Rick
Also, what do I need to do to change the subject of the thread. I have LOTS of members and having all of the user names in the subject line is way too much clutter.

Thank you.

Rick

The easiest thing to do is replace:

$title3.= $bday_title;

with:

$title3.= "our members";

That would make the subject "Happy Birthday to our members on whateverdate".

Enjoy!

Rick 06-17-2004 11:04 PM

Thank you. That did it :D

stamos2003 06-21-2004 07:47 AM

works very fine here, thx. mate !

Onkel_Tom 06-21-2004 10:26 PM

Quote:

Originally Posted by lasto
church media one request if possible - can this be set to ignore zero posters ?
Quote:

Originally Posted by EvilLS1
Yep. I added that and a few other options to mine.

In birthday.php find:
Code:

$birthdays = $DB_site->query("
    SELECT username, email, languageid, birthday, userid

Replace it with:
Code:

$birthdays = $DB_site->query("
        SELECT username, email, languageid, posts, userid, birthday

Find:
Code:

        $emails .= iif($emails, ', ');
        $emails .= $userinfo['username'];

Below it add:
Code:

$posts = $userinfo[posts];
Find:
Code:

// Create Birthday Thread Hack
Below it add:
Code:

if ($posts>='1')
{

You can change the "1" in the code above to whatever you want the minium posts for birthday threads to be


Find:
Code:

// End Create Birthday Thread Hack
Above it add:
Code:

}
If you also want to limit the birthday threads & emails to users who have visited the site within the time set in your admin panel for showing birthdays on forum home do this:

In birthday.php find:
Code:

$birthdays = $DB_site->query("
Above it add:
Code:

        if ($vboptions['birthdaydatecut'])
        {
                $datecut = TIMENOW - (intval($vboptions['birthdaydatecut']) * 86400);
                $activitycut = "AND lastactivity >= $datecut";
        }
        else
        {
                $activitycut = '';
        }

Find:
Code:

    (options & $_USEROPTIONS[adminemail]) AND
    usergroupid IN ($ids)
");

Replace it with:
Code:

        (options & $_USEROPTIONS[adminemail]) AND
        usergroupid IN ($ids) $activitycut
");


This doesn't work for me.
If only users with zero posts has birthday on a day this addition works, but if other users with more than zero post has also birthday a greating thread is generated and also the zero posters are greated !

any idea?

Onkel_Tom 06-21-2004 10:46 PM

I fixed the problem with the following database query:
PHP Code:

$birthdays $DB_site->query("
    SELECT username, email, languageid, posts, userid, birthday
    FROM " 
TABLE_PREFIX "user
    WHERE birthday LIKE '
$today-%' AND
    (options & 
$_USEROPTIONS[adminemail]) AND
    usergroupid IN (
$ids) AND posts >20
"
); 


Blackbeard 06-28-2004 05:44 PM

iam having problems i have done the hack as in the download and today this was made as a post not as the screenie shows.
Also a side effect has happened, in my admin panel in forums and moderator the options in the controls ie edit, delete have disappeared but when i delete the post the options have reappeared.

this is how the post was displayed.

Dear Forum,<br><br>Here are today's birthdays!<br><br><a href="member.php?u=124">RUGGY</a>, born 06-28-1938
<a href="member.php?u=54">RONNIEBI</a>, born 06-28-1941

Any ideas

ChurchMedia 06-28-2004 06:08 PM

Looks like you need to turn on HTML for your birthday forum. Then the HTML code will disappear.

That second problem is a new one to me. Are you listing yourself as the poster?

Blackbeard 06-29-2004 02:12 PM

Sorted the first second one seems to have gone away strange

jluerken 07-19-2004 06:21 PM

Hi there,

the post is done very well in my 3.0.3er Version but the Thread does not get a title on the forumhome.

Take a look at my screen and you will see!


All times are GMT. The time now is 01:19 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.01176 seconds
  • Memory Usage 1,754KB
  • 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
  • (12)bbcode_code_printable
  • (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)pagenav_pagelinkrel
  • (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