|
#1
|
|||
|
|||
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 |
#2
|
||||
|
||||
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 } ?> |
#3
|
|||
|
|||
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. |
#4
|
|||
|
|||
what he gave you is a script to include in the index page.. or whatever page u want it to apear
|
#5
|
|||
|
|||
Nightcrawler without fail is the best ;)
|
#6
|
|||
|
|||
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. |
#7
|
||||
|
||||
Quote:
It can be a plugin most plugins are just an iframe pointing to the file. |
#8
|
|||
|
|||
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 :) |
Tags |
birthday , mod , ts56 |
|
|
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 |