Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Q
question2answer
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
outils
question2answer
Commits
bfeb6aea
Commit
bfeb6aea
authored
Sep 25, 2014
by
Scott
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add text direction option
Passed into theme and stored as boolean ‘isRTL’.
parent
19607508
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
20 additions
and
10 deletions
+20
-10
qa-app-format.php
qa-include/qa-app-format.php
+1
-1
qa-app-options.php
qa-include/qa-app-options.php
+1
-0
qa-lang-options.php
qa-include/qa-lang-options.php
+2
-1
qa-page-admin-default.php
qa-include/qa-page-admin-default.php
+6
-1
qa-theme-base.php
qa-include/qa-theme-base.php
+10
-7
No files found.
qa-include/qa-app-format.php
View file @
bfeb6aea
...
...
@@ -1810,7 +1810,7 @@
// Finally, instantiate the object
$themeclass
=
new
$classname
(
$template
,
$content
,
$themeroothtml
,
$request
);
$themeclass
=
new
$classname
(
$template
,
$content
,
$themeroothtml
,
$request
,
qa_opt
(
'site_text_direction'
)
);
return
$themeclass
;
}
...
...
qa-include/qa-app-options.php
View file @
bfeb6aea
...
...
@@ -351,6 +351,7 @@
'show_user_points'
=>
1
,
'show_user_titles'
=>
1
,
'show_when_created'
=>
1
,
'site_text_direction'
=>
'ltr'
,
'site_theme'
=>
'Snow'
,
'smtp_port'
=>
25
,
'sort_answers_by'
=>
'created'
,
...
...
qa-include/qa-lang-options.php
View file @
bfeb6aea
...
...
@@ -261,8 +261,9 @@
'show_when_created'
=>
'Show age of user posts:'
,
'site_language'
=>
'Site language:'
,
'site_maintenance'
=>
'Take site down for temporary maintenance'
,
'site_t
heme_mobile'
=>
'Theme for mobiles
:'
,
'site_t
ext_direction'
=>
'Site text direction
:'
,
'site_theme'
=>
'Site theme:'
,
'site_theme_mobile'
=>
'Theme for mobiles:'
,
'site_title'
=>
'Q&A site name:'
,
'site_url'
=>
'Preferred site URL:'
,
'smtp_active'
=>
'Send email via SMTP instead of local mail'
,
...
...
qa-include/qa-page-admin-default.php
View file @
bfeb6aea
...
...
@@ -281,7 +281,7 @@
switch
(
$adminsection
)
{
case
'general'
:
$subtitle
=
'admin/general_title'
;
$showoptions
=
array
(
'site_title'
,
'site_url'
,
'neat_urls'
,
'site_language'
,
'site_theme'
,
'site_theme_mobile'
,
'tags_or_categories'
,
'site_maintenance'
);
$showoptions
=
array
(
'site_title'
,
'site_url'
,
'neat_urls'
,
'site_language'
,
'site_theme'
,
'site_theme_mobile'
,
'
site_text_direction'
,
'
tags_or_categories'
,
'site_maintenance'
);
break
;
case
'emails'
:
...
...
@@ -1045,6 +1045,11 @@
$optionfield
[
'suffix'
]
=
$namehtml
.
' '
.
$authorhtml
.
' '
.
$updatehtml
;
break
;
case
'site_text_direction'
:
$directions
=
array
(
'ltr'
=>
'LTR'
,
'rtl'
=>
'RTL'
);
qa_optionfield_make_select
(
$optionfield
,
$directions
,
$value
,
'ltr'
);
break
;
case
'tags_or_categories'
:
qa_optionfield_make_select
(
$optionfield
,
array
(
''
=>
qa_lang_html
(
'admin/no_classification'
),
...
...
qa-include/qa-theme-base.php
View file @
bfeb6aea
...
...
@@ -47,15 +47,17 @@
protected
$lines
=
0
;
protected
$context
=
array
();
// whether to use new block layout in rankings (true) or fall back to tables (false)
protected
$ranking_block_layout
=
false
;
protected
$rooturl
;
protected
$template
;
protected
$content
;
protected
$rooturl
;
protected
$request
;
protected
$isRTL
;
// (boolean) whether text direction is Right-To-Left
// whether to use new block layout in rankings (true) or fall back to tables (false)
protected
$ranking_block_layout
=
false
;
public
function
__construct
(
$template
,
$content
,
$rooturl
,
$request
)
public
function
__construct
(
$template
,
$content
,
$rooturl
,
$request
,
$textdir
=
'ltr'
)
/*
Initialize the object and assign local variables
*/
...
...
@@ -64,15 +66,16 @@
$this
->
content
=
$content
;
$this
->
rooturl
=
$rooturl
;
$this
->
request
=
$request
;
$this
->
isRTL
=
$textdir
===
'rtl'
;
}
/**
* @deprecated PHP4-style constructor deprecated from 1.7; please use proper `__construct`
* function instead.
*/
public
function
qa_html_theme_base
(
$template
,
$content
,
$rooturl
,
$request
)
public
function
qa_html_theme_base
(
$template
,
$content
,
$rooturl
,
$request
,
$textdir
=
'ltr'
)
{
self
::
__construct
(
$template
,
$content
,
$rooturl
,
$request
);
self
::
__construct
(
$template
,
$content
,
$rooturl
,
$request
,
$textdir
);
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment