FAQ
| This is a
LIVE
service |
Changelog
Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
drupal-cambridge-profile
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Admin message
GitLab has been upgraded. See what's new in the
Changelog
.
Show more breadcrumbs
Information Services
DevOps
Drupal team
drupal-cambridge-profile
Commits
4e2230cb
Commit
4e2230cb
authored
10 years ago
by
thewilkybarkid
Browse files
Options
Downloads
Patches
Plain Diff
Add and enable the CKEditor Link module
parent
41de49bd
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/cambridge/cambridge.info
+1
-0
1 addition, 0 deletions
src/cambridge/cambridge.info
src/cambridge/cambridge.install
+71
-0
71 additions, 0 deletions
src/cambridge/cambridge.install
src/cambridge/cambridge.make
+1
-0
1 addition, 0 deletions
src/cambridge/cambridge.make
with
73 additions
and
0 deletions
src/cambridge/cambridge.info
+
1
−
0
View file @
4e2230cb
...
@@ -27,6 +27,7 @@ dependencies[] = taxonomy
...
@@ -27,6 +27,7 @@ dependencies[] = taxonomy
dependencies[] = admin_menu
dependencies[] = admin_menu
dependencies[] = admin_menu_toolbar
dependencies[] = admin_menu_toolbar
dependencies[] = ckeditor
dependencies[] = ckeditor
dependencies[] = ckeditor_link
dependencies[] = date
dependencies[] = date
dependencies[] = email
dependencies[] = email
dependencies[] = features
dependencies[] = features
...
...
This diff is collapsed.
Click to expand it.
src/cambridge/cambridge.install
+
71
−
0
View file @
4e2230cb
...
@@ -244,12 +244,29 @@ function cambridge_install() {
...
@@ -244,12 +244,29 @@ function cambridge_install() {
// Turn off Advanced Content Filter.
// Turn off Advanced Content Filter.
$settings
[
'js_conf'
]
=
'config.allowedContent = true;'
;
$settings
[
'js_conf'
]
=
'config.allowedContent = true;'
;
$plugins
=
ckeditor_load_plugins
();
// Enable CKEditor Link plugin.
$settings
[
'loadPlugins'
][
'ckeditor_link'
]
=
$plugins
[
'ckeditor_link'
];
db_update
(
'ckeditor_settings'
)
db_update
(
'ckeditor_settings'
)
->
fields
(
array
(
'settings'
=>
serialize
(
$settings
)))
->
fields
(
array
(
'settings'
=>
serialize
(
$settings
)))
->
condition
(
'name'
,
$name
)
->
condition
(
'name'
,
$name
)
->
execute
();
->
execute
();
}
}
// Add the CKEditor Link filter.
foreach
(
array
(
'filtered_html'
,
'full_html'
)
as
$format_name
)
{
$format
=
filter_format_load
(
$format_name
);
$format
->
filters
=
filter_list_format
(
$format_name
);
foreach
(
$format
->
filters
as
$key
=>
$filter
)
{
$format
->
filters
[
$key
]
=
(
array
)
$filter
;
}
$format
->
filters
[
'ckeditor_link_filter'
][
'status'
]
=
1
;
filter_format_save
(
$format
);
}
filter_formats_reset
();
// Fix usernames in emails
// Fix usernames in emails
cambridge_update_7101
();
cambridge_update_7101
();
}
}
...
@@ -401,3 +418,57 @@ function cambridge_update_7105() {
...
@@ -401,3 +418,57 @@ function cambridge_update_7105() {
throw
new
DrupalUpdateException
(
'Failed to install Pathauto Persistent State module'
);
throw
new
DrupalUpdateException
(
'Failed to install Pathauto Persistent State module'
);
}
}
}
}
/**
* Enable the CKEditor Link module
*/
function
cambridge_update_7106
()
{
if
(
module_exists
(
'ckeditor_link'
)
||
FALSE
===
module_exists
(
'ckeditor'
))
{
return
;
}
if
(
FALSE
===
module_enable
(
array
(
'ckeditor_link'
)))
{
throw
new
DrupalUpdateException
(
'Failed to install CKEditor link module'
);
}
$profiles
=
db_select
(
'ckeditor_settings'
,
's'
)
->
fields
(
's'
)
->
condition
(
'name'
,
array
(
'Advanced'
,
'Full'
),
'IN'
)
->
execute
()
->
fetchAllAssoc
(
'name'
);
if
(
0
===
count
(
$profiles
))
{
// Profiles have changed.
return
;
}
foreach
(
$profiles
as
$name
=>
$profile
)
{
$settings
=
unserialize
(
$profile
->
settings
);
$plugins
=
ckeditor_load_plugins
();
// Enable CKEditor Link plugin.
$settings
[
'loadPlugins'
][
'ckeditor_link'
]
=
$plugins
[
'ckeditor_link'
];
db_update
(
'ckeditor_settings'
)
->
fields
(
array
(
'settings'
=>
serialize
(
$settings
)))
->
condition
(
'name'
,
$name
)
->
execute
();
}
// Add the CKEditor Link filter.
foreach
(
array
(
'filtered_html'
,
'full_html'
)
as
$format_name
)
{
$format
=
filter_format_load
(
$format_name
);
if
(
FALSE
===
$format
)
{
// Text format no longer exists.
continue
;
}
$format
->
filters
=
filter_list_format
(
$format_name
);
foreach
(
$format
->
filters
as
$key
=>
$filter
)
{
$format
->
filters
[
$key
]
=
(
array
)
$filter
;
}
$format
->
filters
[
'ckeditor_link_filter'
][
'status'
]
=
1
;
filter_format_save
(
$format
);
}
filter_formats_reset
();
}
This diff is collapsed.
Click to expand it.
src/cambridge/cambridge.make
+
1
−
0
View file @
4e2230cb
...
@@ -10,6 +10,7 @@ projects[advanced_help] = "1.1"
...
@@ -10,6 +10,7 @@ projects[advanced_help] = "1.1"
projects[ckeditor]
=
"1.15"
projects[ckeditor]
=
"1.15"
libraries[ckeditor][download][type]
=
"file"
libraries[ckeditor][download][type]
=
"file"
libraries[ckeditor][download][url] = "http
:
//download.cksource.com/CKEditor/CKEditor/CKEditor%204.4.4/ckeditor_4.4.4_full.tar.gz"
libraries[ckeditor][download][url] = "http
:
//download.cksource.com/CKEditor/CKEditor/CKEditor%204.4.4/ckeditor_4.4.4_full.tar.gz"
projects[ckeditor_link]
=
"2.3"
projects[context]
=
"3.2"
projects[context]
=
"3.2"
projects[date]
=
"2.8"
projects[date]
=
"2.8"
projects[delta]
=
"3.0-beta11"
projects[delta]
=
"3.0-beta11"
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment