- Timestamp:
- 11/24/09 19:42:51 (2 years ago)
- Location:
- trunk
- Files:
-
- 6 edited
-
common/external_libs/simple_html_dom.php (modified) (1 diff)
-
www/controllers/user.php (modified) (1 diff)
-
www/format/pager.php (modified) (1 diff)
-
www/macros/macro_calendar.php (modified) (1 diff)
-
www/views/user.php (modified) (1 diff)
-
www/wiki/latex.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/common/external_libs/simple_html_dom.php
r969 r1063 269 269 // return nth-element or array 270 270 if (is_null($idx)) return $found; 271 else if ($idx<0) $idx = count($found) + $idx;271 else if ($idx<0) $idx = count($found) + $idx; 272 272 return (isset($found[$idx])) ? $found[$idx] : null; 273 273 } -
trunk/www/controllers/user.php
r852 r1063 20 20 'title' => $user['full_name'].' ('.$user['username'].')', 21 21 'page_name' => $page_name, 22 'revision' => $revision,22 'revision' => $revision, 23 23 'revision_count' => textblock_get_revision_count($page_name), 24 24 'action' => $action, -
trunk/www/format/pager.php
r953 r1063 9 9 // * url_args : Base arguments for the url function. Defaults to _GET. 10 10 // * param_prefix : Prefix for url parameters. 11 // * show_count : Show number of entries. true / false11 // * show_count : Show number of entries. true / false 12 12 // * show_display_entries : Shows "results per page" links 13 13 // -
trunk/www/macros/macro_calendar.php
r958 r1063 6 6 $forumurl = url_forum(); 7 7 8 // Find all events which are happening in the near future that the member can see.9 $result = db_fetch_all("10 SELECT11 cal.ID_EVENT, cal.startDate, cal.endDate, cal.title, cal.ID_MEMBER, cal.ID_TOPIC,12 cal.ID_BOARD, t.ID_FIRST_MSG13 FROM ia_smf_calendar AS cal14 LEFT JOIN ia_smf_boards AS b ON (b.ID_BOARD = cal.ID_BOARD)15 LEFT JOIN ia_smf_topics AS t ON (t.ID_TOPIC = cal.ID_TOPIC)16 WHERE cal.endDate >= '" . strftime('%Y-%m-%d', time()) . "' AND8 // Find all events which are happening in the near future that the member can see. 9 $result = db_fetch_all(" 10 SELECT 11 cal.ID_EVENT, cal.startDate, cal.endDate, cal.title, cal.ID_MEMBER, cal.ID_TOPIC, 12 cal.ID_BOARD, t.ID_FIRST_MSG 13 FROM ia_smf_calendar AS cal 14 LEFT JOIN ia_smf_boards AS b ON (b.ID_BOARD = cal.ID_BOARD) 15 LEFT JOIN ia_smf_topics AS t ON (t.ID_TOPIC = cal.ID_TOPIC) 16 WHERE cal.endDate >= '" . strftime('%Y-%m-%d', time()) . "' AND 17 17 cal.startDate <= DATE_ADD(NOW(), INTERVAL 7 DAY) 18 ORDER BY cal.startDate19 LIMIT $max_events");20 $return = array();21 $duplicates = array();18 ORDER BY cal.startDate 19 LIMIT $max_events"); 20 $return = array(); 21 $duplicates = array(); 22 22 setlocale(LC_TIME, 'ro_RO.utf8'); 23 23 foreach ($result as $row) 24 {25 // Check if we've already come by an event linked to this same topic with the same title... and don't display it if we have.26 if (!empty($duplicates[$row['title'] . $row['ID_TOPIC']]))27 continue;24 { 25 // Check if we've already come by an event linked to this same topic with the same title... and don't display it if we have. 26 if (!empty($duplicates[$row['title'] . $row['ID_TOPIC']])) 27 continue; 28 28 29 if ($row['startDate'] < strftime('%Y-%m-%d', time()))30 $date = strftime('%Y-%m-%d', time());31 else32 $date = $row['startDate'];29 if ($row['startDate'] < strftime('%Y-%m-%d', time())) 30 $date = strftime('%Y-%m-%d', time()); 31 else 32 $date = $row['startDate']; 33 33 34 $return[$date][] = array(35 'id' => $row['ID_EVENT'],36 'title' => $row['title'],37 'modify_href' => $forumurl . '?action=' . ($row['ID_BOARD'] == 0 ? 'calendar;sa=post;' : 'post;msg=' . $row['ID_FIRST_MSG'] . ';topic=' . $row['ID_TOPIC'] . '.0;calendar;') . 'eventid=' . $row['ID_EVENT'],38 'href' => $row['ID_BOARD'] == 0 ? '' : $forumurl . '?topic=' . $row['ID_TOPIC'] . '.0',39 'link' => $row['ID_BOARD'] == 0 ? $row['title'] : '<a href="' . $forumurl . '?topic=' . $row['ID_TOPIC'] . '.0">' . $row['title'] . '</a>',40 'start_date' => $row['startDate'],41 'end_date' => $row['endDate'],42 'is_last' => false43 );34 $return[$date][] = array( 35 'id' => $row['ID_EVENT'], 36 'title' => $row['title'], 37 'modify_href' => $forumurl . '?action=' . ($row['ID_BOARD'] == 0 ? 'calendar;sa=post;' : 'post;msg=' . $row['ID_FIRST_MSG'] . ';topic=' . $row['ID_TOPIC'] . '.0;calendar;') . 'eventid=' . $row['ID_EVENT'], 38 'href' => $row['ID_BOARD'] == 0 ? '' : $forumurl . '?topic=' . $row['ID_TOPIC'] . '.0', 39 'link' => $row['ID_BOARD'] == 0 ? $row['title'] : '<a href="' . $forumurl . '?topic=' . $row['ID_TOPIC'] . '.0">' . $row['title'] . '</a>', 40 'start_date' => $row['startDate'], 41 'end_date' => $row['endDate'], 42 'is_last' => false 43 ); 44 44 45 // Let's not show this one again, huh?46 $duplicates[$row['title'] . $row['ID_TOPIC']] = true;47 }45 // Let's not show this one again, huh? 46 $duplicates[$row['title'] . $row['ID_TOPIC']] = true; 47 } 48 48 49 foreach ($return as $mday => $array)50 $return[$mday][count($array) - 1]['is_last'] = true;49 foreach ($return as $mday => $array) 50 $return[$mday][count($array) - 1]['is_last'] = true; 51 51 52 52 $html = '<div class="calendar">'; 53 53 $html .= '<div class="header">'; 54 54 $html .= '<a href="'.IA_URL.'forum?action=calendar">In curand...</a></div>'; 55 foreach ($return as $mday => $array)55 foreach ($return as $mday => $array) 56 56 { 57 57 $html .= '<div class="date">'.strftime("%A, %d %b %Y", strtotime($mday)).'</div>'; 58 foreach ($array as $event)59 {58 foreach ($array as $event) 59 { 60 60 $html .= '<div class="event">'; 61 61 $html .= '»'; 62 $html .= $event['link'];62 $html .= $event['link']; 63 63 $html .= '</div>'; 64 }64 } 65 65 } 66 66 $html .= '</div>'; -
trunk/www/views/user.php
r1035 r1063 33 33 // FIXME: duplicated code (see views/textblock_view.php) 34 34 if (getattr($view, 'revision')) { 35 include('revision_warning.php');35 include('revision_warning.php'); 36 36 } 37 37 -
trunk/www/wiki/latex.php
r934 r1063 23 23 * Revised by Steve Mayer 24 24 * This file can be included in many PHP programs by using something like (see example.php to see how it can be used) 25 * include_once('/full_path_here_to/latexrender/latex.php');26 * $text_to_be_converted=latex_content($text_to_be_converted);25 * include_once('/full_path_here_to/latexrender/latex.php'); 26 * $text_to_be_converted=latex_content($text_to_be_converted); 27 27 * $text_to_be_converted will then contain the link to the appropriate image 28 28 * or an error code as follows (the values can be altered in class.latexrender.php): 29 * 0 OK30 * 1 Formula longer than 10000 characters31 * 2 Includes a blacklisted tag32 * 3 Latex rendering failed33 * 4 Cannot create DVI file34 * 5 Picture larger than 800 x 600 followed by x x y dimensions35 * 6 Cannot copy image to latex directory29 * 0 OK 30 * 1 Formula longer than 10000 characters 31 * 2 Includes a blacklisted tag 32 * 3 Latex rendering failed 33 * 4 Cannot create DVI file 34 * 5 Picture larger than 800 x 600 followed by x x y dimensions 35 * 6 Cannot copy image to latex directory 36 36 * 37 37 * This version includes Mike Boyle's modifications to allow vertical offset of LaTeX formulae
Note: See TracChangeset
for help on using the changeset viewer.
![[infoarena] development](/chrome/site/logo.png)