Login
Username

Password



Not a member yet?
Click here to register.

Forgotten your password?
Request a new one here.
Navigation
Latest Addons
AD Gallery 64
SyntaxHighlighte... 51
Newsletters v4.03 114
Facebook Like Box 132
Newsletters v4.02 60
Metro 171
Facebook Connect 173
Shoutbox Panel 129
Redactor for PHP... 107
MI Floating Side... 109
Facebook Login/R... 156
Avatar Studio v2.03 180
Relationship Sta... 98
Sexual Orientati... 116
Fisherman 144
Popular Addons
iTheme2 5808
Arise 5805
User Control v1.23 4623
Event Calendar 4053
Photowidget panel 3888
Radio-Theme red2... 3359
Highslide Gallery 3315
CSS/JavaScript D... 3234
Facebook Connect... 2990
Dynamic Menu 2895
Slideshow Lightb... 2727
L-AMANT 2660
Enigma 2637
2Dark 2608
Black 2580
View Thread
Official Home of PHP-Fusion » General Addon and Modification Support » Panels and Infusions
Who is here? 1 guest(s)
 Print Thread
Event order
Chibanga
I have a event panel and i want to be order by table: tnpm9496_aw_ec_events column:ev_start_time

pls help

panel:
Download source  Code
<?php

if(!defined('IN_FUSION')) {
   die;
}


require_once(INFUSIONS.'aw_ecal_panel/include/core.php');



/****************************************************************************
 * FUNCS
 */
if(!function_exists('awec_post_process_events')) {
function awec_post_process_events(&$events, &$out)
{
   global $ec_today, $ec_tomorrow, $locale, $awec_settings;

   $count = 0;

   $out = array(
      'today'      => array(),
      'tomorrow'   => array(),
      'others'   => array(),
   );

   $current = 'others';
   $path_event = INFUSIONS.'aw_ecal_panel/view_event.php?id=';
   $path_birthday = INFUSIONS.'aw_ecal_panel/birthday.php?id=';
   $show_details = ($awec_settings['show_today_in_panel'] ? true : false);

   foreach($events as $year => $y_data) {
      ksort($y_data, SORT_NUMERIC);
      foreach($y_data as $month => $m_data) {
         ksort($m_data, SORT_NUMERIC);

         $today_month = ($ec_today['mon']==$month && $ec_today['year']==$year);
         $tomorrow_month = ($ec_tomorrow['mon']==$month && $ec_tomorrow['year']==$year);

         foreach($m_data as $mday => $d_data) {
            if($today_month && $ec_today['mday']==$mday) {
               $current = 'today';
            } else if($tomorrow_month && $ec_tomorrow['mday']==$mday) {
               $current = 'tomorrow';
            } else {
               $current = 'others';
            }


            foreach($d_data as $ev) {
               $item = '';
               if($current!='others') {
                  if($ev['start_time']) {
                     $item .= $ev['start_time'];
                     if($ev['end_time']) {
                        $item .= '-'.$ev['end_time'];
                     }
                     $item .= '&nbsp;';
                  }
               } else {
                  $item .= awec_format_****ing_date($year,
                        $month, $mday).'&nbsp;';
               }
               if($ev['is_birthday']) {
                  $path = $path_birthday.$ev['user_id'];
               } else {
                  $path = $path_event.$ev['event_id'];
               }

               $item .= '<a href="'.$path.'">'
                  .$ev['ev_title'].'</a>';

               if($show_details && $current=='today') {
                  $body = parseubb($ev['ev_body']);
                  $body = explode(stripinput(AWEC_BREAK), $body);
                  if(count($body)>1) {
                     $body[0] .= ' <a href="'.$path.'">'.$locale['EC207'].'</a>';
                  }
                  $item .= '<br /><span class="small2">'.$body[0].'</span>';
               }

               $out[$current][] = $item;
               ++$count;
            }
         }
      }
   }

   return $count;
}
}



/****************************************************************************
 * GUI
 */
opensidex("Today freerolls", "off");

$path = INFUSIONS.'aw_ecal_panel';

if(iMEMBER && false) {
   echo '
<ul>';
   if(iAWEC_POST) {
      echo '
   <li><a href="'.$path.'/edit_event.php">'.$locale['EC200'].'</a></li>';
   }
   echo '
   <li><a href="'.$path.'/my_events.php">'.$locale['EC204'].'</a></li>
   <li><a href="'.$path.'/my_logins.php">'.$locale['EC206'].'</a></li>';
   if(iSUPERADMIN) {
      echo '
   <li><a href="'.$path.'/admin.php">'.$locale['EC700'].'</a></li>';
   }
   echo '
</ul>';
}


if(iAWEC_ADMIN
   && ff_db_count("(*)", AWEC_DB_EVENTS, "(ev_status='".AWEC_PENDING."')"))
{
   echo '
<div style="text-align:center;">
<p>
   <strong><a href="'.$path.'/new_events.php">'.$locale['EC203'].'</a></strong>
</p>
</div>';
}



/*
 * show next x days
 */
if($awec_settings['next_days_in_panel']) {
   $from_time = $awec_now;
   $to_time = $from_time+($awec_settings['next_days_in_panel']-1)*86400;

   $events = array();
   $needle = array(
      'from'   => date('Y-m-d', $from_time),
      'to'   => date('Y-m-d', $to_time),
   );
   awec_get_events($needle, $events, false);


   $out = array();
   $count = awec_post_process_events($events, $out);


   if(!$count) {
      echo '
<p>
<span class="small2">'.$locale['awec_no_events'].'</span>
</p>';
   }

   $more = 0;
   foreach($out as $type => $content) {
      if(!count($content)) {
         continue;
      }
      if($type!='others' || $more) {
         echo '
<strong>'.$locale['EC209'][$type].':</strong>';
      }
      echo '
<ul>
   <li>'.implode("</li>\n\t<li>", $content).'</li>
</ul>';
      ++$more;
   }

}
echo '<strong>Help us by submiting your freerolls: <a href="http://www.tugasnopoker.com/Poker/forum/viewforum.php?forum_id=2">SPECIAL</a> | <a href="http://www.tugasnopoker.com/Poker/forum/viewforum.php?forum_id=35">DAILY</a> | <a href="http://www.tugasnopoker.com/Poker/forum/viewforum.php?forum_id=60">WEEKLY</a> | <a href="http://www.tugasnopoker.com/Poker/forum/viewforum.php?forum_id=68">MONTHLY</a></strong>
';

closesidex();
?>



 
wibix
that should already be the case. it is not?
 
Chibanga
wibix wrote:

that should already be the case. it is not?


no if you visit www.tugasnopoker.... you can see its not order


00:00 Carbon poker - Pokercam weekly freeroll
12:00 True Poker - Freeroll Super Series
18:00 Poker MIRA - Chek-Reis Freeroll
19:02 888 Poker - $1000 Dia de Portugal Freeroll
17:30 Ladbrokes Poker - Ladbrokes Poker Social Series
18:00 24h Poker - GT500 Texas Freeroll
18:00 Carbon poker- World Series Tavern Poker's Sunday
18:30 Ladbrokes - Pokerstrategy Daily €100 freeroll
19:00 Betsson - Omaha $ 50 Freeroll
19:00 *Comeon Poker - Reloaders Freeroll*
19:19 MyBet - mouz.CardCoaches Sonntagsevent
20:00 PokerMambo - Weekly 150€ Freeroll
20:00 *PaddyPowerPoker - Power One Freeroll*
21:00 LadBrokes Poker - BettingPro Euro 2012 Freeroll
21:00 *888poker - Liga del Jugón Master*
21:30 BwinPoker - $1.000 Added Freeroll

almost all are order but some dosent
 
wibix
i see. assume it has something to do with the recurring events but could not reproduce at home. which of the events are recurring and how?
 
Chibanga
Look today events 12-06-2012:
repeted daily 10.06.2012 12:00 True Poker - Freeroll Super Series
repeted daily 10.06.2012 16:00 BwinPoker - $1.000 Added Freeroll
repeted daily 10.06.2012 18:00 24h Poker - GT500 Texas Freeroll
repeted daily 10.06.2012 18:30 Ladbrokes - Pokerstrategy Daily €100 freeroll
repeted daily 10.06.2012 19:00 Betsson - Omaha $ 50 Freeroll
repeted daily 10.06.2012 21:30 BwinPoker - $1.000 Added Freeroll
repeted daily 11.06.2012 17:30-21:30 Betclic - $50 Freeroll
repeted daily 11.06.2012 to 31.12.2012 18:00 Bestpoker - $100 Freeroll
repeted daily 11.06.2012 19:00 Casinoeuro - 50$ Omaha
repeted daily 11.06.2012 to 19.06.2012 19:30 *Pokeridol - Xbox Freeroll Qualiffier*
00:00 Betraiser - Facebook Tuesdays
19:00 *SmartLive Poker/GuruPlay Poker - Twitter Tuesday*
21:00 Lotus Poker - ua.Championat.com
repeted daily 12.06.2012 to 31.12.2012 19:00 Casinoeuro - 100$ Texas Freeroll
21:00 Offsidebet - Pokerleague $100 RB
 
wibix
ok, now i could reproduce it. i see whats wrong. i ll try to fix it...

Merged on Jun 18 2012 at 19:10:19:
pls try the attached file.
wibix attached the following file:
aw_ecal_panel.zip [3.66kB / 57 Downloads]

Edited by wibix on 18-06-2012 18:11
 
Chibanga
wibix wrote:

ok, now i could reproduce it. i see whats wrong. i ll try to fix it...

Merged on Jun 18 2012 at 19:10:19:
pls try the attached file.


no, not right order see:


18:30 Pkr poker - $20 Freeroll Facebook (Special)
12.06.2012 19:00 DAILY - CasinoEuro - 100$ Texas Freeroll
21:00 *Offsidebet - Pokerleague $50 OPP*
21:00 Everest Poker - Liga Estrela do Męs
21:45 *iGame - PokerPT.com 6-max*
21:30 *iGame - PokerPT.com 6-max*
12.06.2012 19:00-22:00 DAILY - Betclic - $100 Freeroll
11.06.2012 18:00 DAILY - Bestpoker - $100 Freeroll
10.06.2012 18:00 DAILY - 24h Poker - GT500 Texas Freeroll
10.06.2012 16:00 DAILY - BwinPoker - $1.000 Added Freeroll
10.06.2012 18:30 DAILY - Ladbrokes - Pokerstrategy Daily €100 freeroll
10.06.2012 19:00 DAILY - Betsson OR CasinoEuro - Omaha $ 50 Freeroll
11.06.2012 17:30-21:30 DAILY - Betclic - $50 Freeroll
10.06.2012 21:30 DAILY - BwinPoker - $1.000 Added Freeroll
10.06.2012 12:00 DAILY - True Poker - Freeroll Super Series

it should order only by time, by the way it wasent the aw_ecal_panel but the aw_ecal_next_panel that i wanted. Its possible to put category name before the event and on the top a dropdown box with event selector? that would be great...
 
wibix
aw_ecal_next_panel -- aahh -- check out the attachment.

categories: dropdown box with event selector? does not understand that
wibix attached the following file:
aw_ecal_next_panel.zip [2.2kB / 52 Downloads]
 
Chibanga
wibix wrote:

aw_ecal_next_panel -- aahh -- check out the attachment.

categories: dropdown box with event selector? does not understand that


No, not right order time

see:
Today:

21:00 WEEKLY - Offsidebet - Pokerleague $100 RB
12.06.2012 19:00 DAILY - CasinoEuro - 100$ Texas Freeroll
18:00 Trimori Poker - Trimori Club Freeroll
18:30 Pkr poker - $100 added Facebook Tournament
21:00 TitanPoker - Liga Estrela do Męs
19:00 *SmartLive Poker / Guru Poker - Twitter Tuesdays*
12.06.2012 19:00-22:00 DAILY - Betclic - $100 Freeroll
11.06.2012 18:00 DAILY - Bestpoker - $100 Freeroll
10.06.2012 18:00 DAILY - 24h Poker - GT500 Texas Freeroll
10.06.2012 16:00 DAILY - BwinPoker - $1.000 Added Freeroll
10.06.2012 18:30 DAILY - Ladbrokes - Pokerstrategy Daily €100 freeroll
10.06.2012 19:00 DAILY - Betsson OR CasinoEuro - Omaha $ 50 Freeroll
11.06.2012 17:30-21:30 DAILY - Betclic - $50 Freeroll
10.06.2012 21:30 DAILY - BwinPoker - $1.000 Added Freeroll
10.06.2012 12:00 DAILY - True Poker - Freeroll Super Series

Tomorrow:

18:30 WEEKLY - dbet Poker - 6 x €500
21:00 WEEKLY - *Offsidebet - Pokerleague $50 OPP*
20:30 Pokeridol - Xbox Final Freeroll
23:00 Pokertime - WickedWednesday500

sorry Smile
dropdown box with category selector and the category name befor the Event like this
21:00 - Category - Offsidebet - Pokerleague $100 RB
 
wibix
ok, try the attachment first.

as for categories. dropbox maybe a problem but category before the rest could be done.
wibix attached the following file:
aw_ecal_next_panel_1.zip [2.21kB / 54 Downloads]
 
Chibanga
wibix wrote:

ok, try the attachment first.

as for categories. dropbox maybe a problem but category before the rest could be done.


works fine great job...

Today:

10.06.2012 12:00 DAILY - True Poker - Freeroll Super Series
10.06.2012 16:00 DAILY - BwinPoker - $1.000 Added Freeroll
11.06.2012 17:30-21:30 DAILY - Betclic - $50 Freeroll
17:30 TowerPoker - $25 Facebook Fan Freeroll
11.06.2012 18:00 DAILY - Bestpoker - $100 Freeroll
10.06.2012 18:00 DAILY - 24h Poker - GT500 Texas Freeroll
18:30 EuroPoker - Facebook Friends Freeroll
18:30 WEEKLY - dbet Poker - 6 x €500
18:30 Pkr poker - $50 Freeroll Facebook (Special)
10.06.2012 18:30 DAILY - Ladbrokes - Pokerstrategy Daily €100 freeroll
19:00 MyBet - $100 Facebook Freeroll
12.06.2012 19:00 DAILY - CasinoEuro - 100$ Texas Freeroll
12.06.2012 19:00-22:00 DAILY - Betclic - $100 Freeroll
10.06.2012 19:00 DAILY - Betsson OR CasinoEuro - Omaha $ 50 Freeroll
20:00 *WilliamHill - L&H Tournament*
20:02 *888 poker - $2,000 Flash Freeroll*
20:30 Pokeridol - Xbox Final Freeroll
21:00 Irish Eyes poker/Toro poker Irish Eyes - Facebook Freeroll
21:00 *Paf poker - Liga del Jugón Classic*
21:00 WEEKLY - *Offsidebet - Pokerleague $50 OPP*
10.06.2012 21:30 DAILY - BwinPoker - $1.000 Added Freeroll
21:30 *iGame - PokerPT.com 6-max*
21:45 *iGame - PokerPT.com 6-max*
22:03 *888 poker - $20,000 EuroMania Tournament*
23:00 Pokertime - WickedWednesday500

Tomorrow:

17:45 WEEKLY - EuroPoker - $1,000 Thursday's FreeRoll
20:00 WEEKLY - Offsidebet - Pokerleague $100 RB

ty _o_
 
wibix
hm, i am not sure about tomorrow but i ll check it out next week.

i ll also make a new next-panel with categories
 
Chibanga
wibix wrote:

hm, i am not sure about tomorrow but i ll check it out next week.

i ll also make a new next-panel with categories



Ok, I appreciate
 
wibix
sry to say, but this looks like so more coding than expected and i dont have much time atm. sry cant do it.
 
Jump to Forum:
Similar Threads
Thread Forum Replies Last Post
Event Calendar Official releases [Infusions] 53 07-04-2013 22:16
Help installing Event Calendar Panels and Infusions 9 20-03-2013 21:26
looking for an infusion or panel with members not on hold in order to be approved Panels and Infusions 4 06-02-2013 21:05
Event calendar - help Panels and Infusions 1 06-06-2012 19:41
Event Calender page counter Panels and Infusions 7 16-05-2012 19:54
Official Home of PHP-Fusion uses cookies. Some may already have been set. Read more about our Cookies here.
Please click the button I Consent Cookies to hide this bar and accept our cookies. If you continue to use the site with no action taken, we'll assume that you consent our cookies anyway.
Cookiebar Panel byVenue