Permalink
Browse files

gitattributes

  • Loading branch information...
1 parent 803b440 commit 51ce7a161df3cc81759281d12b1d0af50daa1658 @svivian committed Jul 13, 2012
Showing with 326 additions and 304 deletions.
  1. +22 −0 .gitattributes
  2. +61 −61 qa-user-activity-layer.php
  3. +243 −243 qa-user-activity.php
View
@@ -0,0 +1,22 @@
+# Auto detect text files and perform LF normalization
+* text=auto
+
+# Custom for Visual Studio
+*.cs diff=csharp
+*.sln merge=union
+*.csproj merge=union
+*.vbproj merge=union
+*.fsproj merge=union
+*.dbproj merge=union
+
+# Standard to msysgit
+*.doc diff=astextplain
+*.DOC diff=astextplain
+*.docx diff=astextplain
+*.DOCX diff=astextplain
+*.dot diff=astextplain
+*.DOT diff=astextplain
+*.pdf diff=astextplain
+*.PDF diff=astextplain
+*.rtf diff=astextplain
+*.RTF diff=astextplain
@@ -1,61 +1,61 @@
-<?php
-/*
- Question2Answer User Activity Plus plugin, v1.0
- License: http://www.gnu.org/licenses/gpl.html
-*/
-
-class qa_html_theme_layer extends qa_html_theme_base
-{
- function q_list_and_form($q_list)
- {
- qa_html_theme_base::q_list_and_form($q_list);
- $handle = $this->_user_handle();
-
- // output activity links under recent activity
- if ( $this->template === 'user' )
- {
- $this->output(
- '<div class="qa-useract-page-links">',
- ' More activity: ',
- ' <a href="' . qa_path('user-activity/questions/'.$handle) . '">All questions</a>',
- ' &bull; ',
- ' <a href="' . qa_path('user-activity/answers/'.$handle) . '">All answers</a>',
- '</div>'
- );
- }
- }
-
- // append activity links to question and answer counts
- function form_fields($form, $columns)
- {
- $handle = $this->_user_handle();
-
- if ( $this->template === 'user' && !empty($form['fields']) )
- {
- foreach ($form['fields'] as $key=>&$field)
- {
- if ( $key === 'questions' )
- {
- $url = qa_path('user-activity/questions/'.$handle);
- $field['value'] .= ' &mdash; <a href="' . $url . '">All questions by ' . qa_html($handle) . ' &rsaquo;</a>';
- }
- else if ( $key === 'answers' )
- {
- $url = qa_path('user-activity/answers/'.$handle);
- $field['value'] .= ' &mdash; <a href="' . $url . '">All answers by ' . qa_html($handle) . ' &rsaquo;</a>';
- }
- }
- }
-
- qa_html_theme_base::form_fields($form, $columns);
- }
-
-
- // grab the handle of the profile you're looking at
- function _user_handle()
- {
- preg_match( '#user/([^/]+)#', $this->request, $matches );
- return !empty($matches[1]) ? $matches[1] : null;
- }
-
-}
+<?php
+/*
+ Question2Answer User Activity Plus plugin, v1.0
+ License: http://www.gnu.org/licenses/gpl.html
+*/
+
+class qa_html_theme_layer extends qa_html_theme_base
+{
+ function q_list_and_form($q_list)
+ {
+ qa_html_theme_base::q_list_and_form($q_list);
+ $handle = $this->_user_handle();
+
+ // output activity links under recent activity
+ if ( $this->template === 'user' )
+ {
+ $this->output(
+ '<div class="qa-useract-page-links">',
+ ' More activity: ',
+ ' <a href="' . qa_path('user-activity/questions/'.$handle) . '">All questions</a>',
+ ' &bull; ',
+ ' <a href="' . qa_path('user-activity/answers/'.$handle) . '">All answers</a>',
+ '</div>'
+ );
+ }
+ }
+
+ // append activity links to question and answer counts
+ function form_fields($form, $columns)
+ {
+ $handle = $this->_user_handle();
+
+ if ( $this->template === 'user' && !empty($form['fields']) )
+ {
+ foreach ($form['fields'] as $key=>&$field)
+ {
+ if ( $key === 'questions' )
+ {
+ $url = qa_path('user-activity/questions/'.$handle);
+ $field['value'] .= ' &mdash; <a href="' . $url . '">All questions by ' . qa_html($handle) . ' &rsaquo;</a>';
+ }
+ else if ( $key === 'answers' )
+ {
+ $url = qa_path('user-activity/answers/'.$handle);
+ $field['value'] .= ' &mdash; <a href="' . $url . '">All answers by ' . qa_html($handle) . ' &rsaquo;</a>';
+ }
+ }
+ }
+
+ qa_html_theme_base::form_fields($form, $columns);
+ }
+
+
+ // grab the handle of the profile you're looking at
+ function _user_handle()
+ {
+ preg_match( '#user/([^/]+)#', $this->request, $matches );
+ return !empty($matches[1]) ? $matches[1] : null;
+ }
+
+}
Oops, something went wrong.

0 comments on commit 51ce7a1

Please sign in to comment.