Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 General Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 06-14-2001, 01:22 PM
Mas*Mind's Avatar
Mas*Mind Mas*Mind is offline
 
Join Date: Oct 2001
Location: Amsterdam, The Netherlands, currently living in Cape Town, South Africa
Posts: 103
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I'm thinking of creating a hack so that if a user has his birthday then a 'balloon' (template customizable ofcourse) or something will be shown next to his name within a thread.

What do you think of it? Usefull?
Reply With Quote
  #2  
Old 06-14-2001, 02:11 PM
kicks
Guest
 
Posts: n/a
Default

I think it would be pretty cool

It'll make the user feel important, I'd definately install it

One thing you can do is also link it to a pm for that user so that people can click on it and send them a "happy birthday" pm
Reply With Quote
  #3  
Old 06-14-2001, 02:38 PM
Freddie Bingham's Avatar
Freddie Bingham Freddie Bingham is offline
 
Join Date: Oct 2001
Posts: 506
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I did this on 1.1.x and it was rather popular with my forum members.
Reply With Quote
  #4  
Old 06-14-2001, 03:14 PM
Steve Machol's Avatar
Steve Machol Steve Machol is offline
 
Join Date: Nov 2001
Posts: 1,896
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

This is a great idea and would really help buid community spirit.
Reply With Quote
  #5  
Old 06-14-2001, 09:42 PM
-dloh-hammer's Avatar
-dloh-hammer -dloh-hammer is offline
 
Join Date: Nov 2001
Posts: 22
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

is it possible to send an email automatic to users have birthday?
Reply With Quote
  #6  
Old 06-14-2001, 10:02 PM
Mas*Mind's Avatar
Mas*Mind Mas*Mind is offline
 
Join Date: Oct 2001
Location: Amsterdam, The Netherlands, currently living in Cape Town, South Africa
Posts: 103
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

with cron that is yeah.

I'm thinking of a way of implementing a simulated cron, which could be built in in vb without extern programs. This wouldn't be very difficult, only it'll depends on wether your board gets visited daily if it gets executed.

The second drawback is, that one user (per day) will experience the extra load of it.
Reply With Quote
  #7  
Old 06-15-2001, 12:35 AM
chrispadfield's Avatar
chrispadfield chrispadfield is offline
 
Join Date: Oct 2001
Posts: 180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

i have been thinking about this simulated cron thing as well. There are a number of small things i wanted done on a daily/hourly basis and it would be nice if i could put them all in a script called daily.php that got excuted, well daily

But not sure the best way to do it. What you need is somewhere a date value and then use one php page to get the data value and compare it to CURDATE() and if 1 day apart than include daily.php

Now, it would be easy just to have another query to check the date but that is quite inefficient. If it was a setting then every page would use it. I thought one way would be to add the extra query to register.php and perform the check on the date there. Register.php is a reasonable choice because i know it gets accessed every day but not that often and it also does not have many queries on it already. For those with less traffic i would think search.php would be good (low queries) or maybe usercp.php but that is a higher amount.
Reply With Quote
  #8  
Old 06-15-2001, 02:58 AM
Dakota's Avatar
Dakota Dakota is offline
 
Join Date: Oct 2001
Posts: 102
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I think that would be a really cool hack. I know that if you made it, I would use it.
Reply With Quote
  #9  
Old 06-15-2001, 06:33 AM
Mas*Mind's Avatar
Mas*Mind Mas*Mind is offline
 
Join Date: Oct 2001
Location: Amsterdam, The Netherlands, currently living in Cape Town, South Africa
Posts: 103
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

the way I though of it was:

make an extra table cronjobs

with the following fields:

ID, (the unique ID)
includeFile, (the file to be included, containing the necesary functions)
lastExecuted, (timestamp on which the cron was last executed to determine if it should be executed or not.)
busy (a flag to set it on busy to ensure no 2 users will execute the same job concurrently)

then in global.php add an extra query:

select * from cronjobs where (lastExecuted - unix_timestamp()) > 24*60*60

then loop through each cronjob, set busy to 1 and include includeFile. when finished the includeFile should set lastExecuted to the current timestamp.:

while($DB_site->fetch_array($results))
{$DB_site->query("UPDATE cronjobs SET busy = 1 where ID = $result[ID]";
include($results[includeFile]);
}

drawbacks:

-an extra query (on every page)
-it's not ensured that the semi-cronjob is executed (allthough highly likely: the more visitors a day, the more likely)
-one visitor a day should experience the extra load of including the include file

but I agree with you: it may be sufficient to only in clude the croncheck on ONE particular page instead of every page so that the extra query isn't included in every page...

possible pages to perform the check:

-usercp
-register
-search
-pm

The thing I like about this is that you can make it kinda modular. You can built in a cp-function to insert/edit/maintain a new semi-cronjob and it'll work immediately. People can create their own cronjobs and share them amongst people. No code of vb would be touched.
Reply With Quote
  #10  
Old 06-15-2001, 08:11 AM
chrispadfield's Avatar
chrispadfield chrispadfield is offline
 
Join Date: Oct 2001
Posts: 180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

that is a great idea - some thoughts.

1. There is a slight problem of a cron job timing out (unlikely) or more possible someone closing their browser or whatever in the middle of the cron job. Some sort of backup mechanism if the cron job is set to busy all the time as if this happened it would never get out of the busy status.

2. Possibility of having cron jobs only set off by a certain usergroup. It might be that we want to do quite a long cron job, for example the community bulletin. If this was the case, doing something like having a page come up

"Doing important server maintenace, please do not close this browser" sort of thing. So long you explained this to your moderators it would work. I know for certain that at least 1 of my moderators is going to visit the site every day.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 07:44 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.03842 seconds
  • Memory Usage 2,244KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (10)postbit
  • (9)postbit_onlinestatus
  • (10)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete