Bravo List

Bravo List (http://www.bvlist.com/index.php)
-   Template Shares (http://www.bvlist.com/forumdisplay.php?f=26)
-   -   Birthday Mod TS5.6 (http://www.bvlist.com/showthread.php?t=3727)

Marco 3rd November 2009 13:40

Birthday Mod TS5.6
 
Hello :)

I need some help .
I wish to put on index page the info abt who's celebrate his birthday, in forum i have this but i wish to be on index.php
i wish if it possible to create a plugin for that :D
thanks a lot :)

regards
Marco

');
    }

    if (($cachesystem != 'yes' OR $no_cache))
    {
      $showbday .= '';
    }
  ?>
 


}
?>
Nightcrawler 11th November 2009 17:26

Im kind of busy atm but i'm sure it will be no problem :) Once i get some free time ill look.

here u go tested and working...

Code:

require_once('global.php');

gzip();
dbconn(true);
maxsysop();

?>
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">



Happy Birthday



if($CURUSER){
   
    define ('SKIP_CACHE_MESSAGE', true);
    require_once INC_PATH . '/functions_cache2.php';
    $no_cache = false;
    if (!$showbday = cache_check2 ('tsf_bday'))
    {
      $no_cache = true;
    }

    if ($no_cache)
    {
      $todaybday = date ('j-n');
      $query = sql_query ('' . 'SELECT u.id,u.username,u.birthday,g.namestyle FROM users u LEFT JOIN usergroups g ON (u.usergroup=g.gid) WHERE u.birthday REGEXP \'^' . $todaybday . '-([1-9][0-9][0-9][0-9])\' AND u.enabled = \'yes\' AND u.status=\'confirmed\' AND u.usergroup != ' . UC_BANNED);
      $bdaycount = mysql_num_rows ($query);
     
      if (0 < $bdaycount)
      {
     
        while ($bday = mysql_fetch_assoc ($query))
        {
          $userbday = explode ('-', $bday['birthday']);
          $yearsold = date ('Y') - $userbday[2];
          $showbday .= ' ' . get_user_color ($bday['username'], $bday['namestyle']) . ' (' . $yearsold . ') ';
        }
      }else{
      $showbday .= '
No birthdays today!
';
      }
      cache_save2 ('tsf_bday', $showbday, '

Marco 7th December 2009 09:32

this is a plugin? because i put it on plugin but cannot show anything :)
LE. maybe tell me where to put , because i put it on plugin folder and shows nothing. :(
if u have more info please write here.
thanks

crztz 8th December 2009 00:04

what he gave you is a script to include in the index page.. or whatever page u want it to apear

mcryow 8th December 2009 00:32

Nightcrawler without fail is the best ;)

Marco 8th December 2009 10:47

maybe it was simple to solve with plugin it's easier and nicer, but i will try to put directly in index.php ;)
i will try and will come back with results.

@ nightcrawler thank you


LE. it's working :) but i thought it will be a plugin ....thanks a lot

Nightcrawler 18th December 2009 11:48

Quote:

Originally Posted by Marco (Post 18161)
maybe it was simple to solve with plugin it's easier and nicer, but i will try to put directly in index.php ;)
i will try and will come back with results.

@ nightcrawler thank you


LE. it's working :) but i thought it will be a plugin ....thanks a lot


It can be a plugin most plugins are just an iframe pointing to the file.

Marco 20th December 2009 23:24

maybe you give some help to create the plugin :D thx in advance

i tried to put the file (php) to act like a plugin but not show anything :)


All times are GMT +2. The time now is 13:48.

Powered by vBulletin® Version 3.8.11 Beta 3
Copyright ©2000 - 2024, vBulletin Solutions Inc.