Bravo List
Register
Go Back   > Bravo List > Source Code > Archived Trackers > Template Shares
Reply
Thread Tools
  #1  
Old 3rd November 2009, 13:40
Marco Marco is offline
Senior Member
 
Join Date: Jun 2009
Seychelles
Posts: 327
Smile 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
Reply With Quote
  #2  
Old 11th November 2009, 17:26
Nightcrawler's Avatar
Nightcrawler Nightcrawler is offline
Senior Member
 
Join Date: Oct 2009
P2P
Posts: 97
Default
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:
<?php
require_once('global.php');

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

?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-type" content="text/html; charset=utf-8" />
<title>Happy Birthday</title>

</head>
<body>
<?php
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 .= ' <a href="' . tsf_seo_clean_text ($bday['username'], 'u', $bday['id'], '', 'ts') . '" target="_top">' . get_user_color ($bday['username'], $bday['namestyle']) . '</a> (<b>' . $yearsold . '</b>) ';
        }
      }else{
      $showbday .= '<center><b> No birthdays today!</b></center>';
      }
      cache_save2 ('tsf_bday', $showbday, '</td></tr>');
    }

    if (($cachesystem != 'yes' OR $no_cache))
    {
      $showbday .= '</td></tr>';
    }
   ?>
   <?php echo $showbday; ?>
</body>
</html>
<?php
}
?>
Reply With Quote
The Following 5 Users Say Thank You to Nightcrawler For This Useful Post:
FENIX (27th January 2013), Fynnon (18th February 2010), Marco (20th December 2009), mcryow (8th December 2009), shuma (22nd June 2010)
  #3  
Old 7th December 2009, 09:32
Marco Marco is offline
Senior Member
 
Join Date: Jun 2009
Seychelles
Posts: 327
Default
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

Last edited by Marco; 7th December 2009 at 21:29.
Reply With Quote
  #4  
Old 8th December 2009, 00:04
crztz crztz is offline
Senior Member
 
Join Date: Apr 2009
P2P
Posts: 34
Default
what he gave you is a script to include in the index page.. or whatever page u want it to apear
Reply With Quote
  #5  
Old 8th December 2009, 00:32
mcryow mcryow is offline
Senior Member
 
Join Date: Jul 2009
P2P
Posts: 16
Default
Nightcrawler without fail is the best ;)
Reply With Quote
  #6  
Old 8th December 2009, 10:47
Marco Marco is offline
Senior Member
 
Join Date: Jun 2009
Seychelles
Posts: 327
Default
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

Last edited by Marco; 8th December 2009 at 11:18.
Reply With Quote
  #7  
Old 18th December 2009, 11:48
Nightcrawler's Avatar
Nightcrawler Nightcrawler is offline
Senior Member
 
Join Date: Oct 2009
P2P
Posts: 97
Default
Quote:
Originally Posted by Marco View Post
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.
Reply With Quote
  #8  
Old 20th December 2009, 23:24
Marco Marco is offline
Senior Member
 
Join Date: Jun 2009
Seychelles
Posts: 327
Default
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 :)
Reply With Quote
Reply

Tags
birthday , mod , ts56


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

Similar Threads
Thread Thread Starter Forum Replies Last Post
[TSSE 5.x] Plugin Birthday FAZ Mods & Themes 20 24th February 2012 12:40
Birthday joeroberts Mods & Themes 10 13th June 2010 16:53
Birthday change ciobancai Template Shares 2 14th August 2009 07:59
Birthday change?! Swompen Torrent Strike 6 29th April 2008 22:29



All times are GMT +2. The time now is 01:53. vBulletin skin by ForumMonkeys. Powered by vBulletin® Version 3.8.11 Beta 3
Copyright ©2000 - 2024, vBulletin Solutions Inc.