Drupal 7 WYSIWYG module with latest ckeditor font change - drupal-7

I want to change the default "Timesnewroman" font to "Verdana" / something else. I tried config.font_style and config.font_names in config.js but it didn't worked. Is there any workaround to change this settings.
Note: I'm using ckeditor plugin via Drupal 7 WYSIWYG module.

You can use hook in your template.php file
function THEMENAME_wysiwyg_editor_settings_alter(&$settings, $context) {
if ($context['profile']->editor == 'ckeditor') {
$settings['font_names'] = 'Arial/Arial, Helvetica, sans-serif; Times New Roman/Times New Roman, Times, serif;Verdana';
$settings['font_defaultLabel'] = 'Verdana';
}
}
You also can add other settings for CKEditor

Related

Laravel Snappy: Excess page

In our application we implemented the laravel snappy for the export pdf. Everything is okay(i managed to export, getting all the values) except that I having an excess blank page.
Controller
$pdf = PDF::loadView('registrations.export.export-pdf', $data)->setOption('footer-right','"page [page] of [topage]"');
return $pdf->stream('invoice.pdf');
Question: Why I have an excess blank page?
The reason it gives me an excess page because of the following css I have used in creating a page break number.
Custom css
.page{
page-break-after: always;
page-break-inside: avoid;
}
So what I did, I changed the page into
Custom css
.page {
overflow: hidden;
page-break-after: always;
}
.page:last-of-type {
page-break-after: auto
}

How can I do conditional build in React?

I have made a website for my company which have theme system like wordpress. Now I've 4 themes. The selected theme name is coming with API. But it's taking all 4 themes when it get build.
Is there any way I can build the website with only the theme name coming from API? and remove other 3 themes code?
The site loading is effecting for loading all 4 themes. So It would be great to me if I could control build without unnecessary themes.
Here is my .env file, I'm taking the theme name from this. And conditionally code is after this.
REACT_APP_HOVERCRAFT_END_POINT='www.example.com'
REACT_APP_SITE_URL='www.example.com'
REACT_APP_FABLE_END_POINT='www.example.com'
REACT_APP_REFRESH_POPUP_TIMEOUT=10
REACT_APP_ASSETS_URL='/assets/'
REACT_APP_BRAND='brand'
REACT_APP_TEMPLATE='delta' // Theme Name
REACT_APP_TEMPLATE_VAR='wun'
REACT_APP_FOOTER_LOGO="alternate"
Conditional code:
// Conditional Theme code
const flightFields = () => {
switch (template) {
case 'alfa':
return require(./bravo);
case 'charlie':
return require(./charlie);
case 'delta':
return require(./delta);
default:
return require(./bravo);
}
}

Drupal - magnific popup only works when logged in

I am using magnific popup JS (http://dimsemenov.com/plugins/magnific-popup/) to produce a popup for a youtube video on my Drupal site. The implementation works fine, but only if I am logged into Drupal. If I am not logged in, the popup link will just go the the youtube page (eg jQuery not initialising).
I suspect there may be something going on with Drupal loading a different version of jQuery when I am logged in. It seems that I may be able to add something to my template file to fix this. Haven't figured it out yet (https://www.drupal.org/node/2165555)
I do not have access to add jQuery update module.
Fixed. Added below snippet to template.php to force a later version of jQuery to load.
function theme_name_js_alter(&$javascript) {
$node_admin_paths = array(
'node/*/edit',
'node/add',
'node/add/*',
'node/*/extend_review_date',
);
$replace_jquery = TRUE;
if (path_is_admin(current_path())) {
$replace_jquery = FALSE;
} else {
foreach ($node_admin_paths as $node_admin_path) {
if (drupal_match_path(current_path(), $node_admin_path)) {
$replace_jquery = FALSE;
}
}
}
// Swap out jQuery to use an updated version of the library.
if ($replace_jquery) {
$javascript['misc/jquery.js']['data'] = '//code.jquery.com/jquery-1.7.0.min.js';
}
}

Drupal 7 Maintenance Mode Custom Page Not working

Prelude
Drupal 7
Bootstrap Business (Active Theme)
Turn on Maintenance Mode
Actions that I have already carried out
Copy maintenance-page.tpl.php from modules/system/maintenance-page.tpl.php
Edit to your needs
Paste it on theme's root folder --> /public_html/sites/all/themes/bootstrap-business
Set $conf variable in /public_html/sites/default/settings.php : $conf['maintenance_theme'] = 'bootstrap_business';`
Nonetheless, the site keeps on showing the modules/system/maintenance-page.tpl.php . I don't know why it is not working. I´ve also tried:
Adding a maintenance-page--offline.page.tpl.php
Setting the theme name as bootstrap-business
None of the above work. I don't think spending 45 minutes on such a simple task is adequate. I know I could just edit the modules/system/maintenance-page.tpl.php, but I don´t believe that's the right way to go.
Any suggestions?
Clear/Flush caches (Theme Registry cache) and try again. If you already did that and did not work add a page preprocess function to your default theme template.php:
bootstrap_business_preprocess_maintenance_page(&$variables) {
if (isset($variables['db_is_active']) && !$variables['db_is_active']) {
// Template suggestion for offline site
$variables['theme_hook_suggestion'] = 'maintenance_page__offline';
}
else {
// Template suggestion for live site (in maintenance mode)
$variables['theme_hook_suggestion'] = 'maintenance_page';
}
}
Related question: https://drupal.stackexchange.com/q/76946/12163

Hiding menu in SRSS

I have created a few reports which like users to be able to access via url mainly. I want to hide the menu options in these URLs'. Not sure how to do this this. This link:
remove-top-links-from-report-server
would require one to modify the actual css file, while this link:
hiding-tool-bar-from-the-ssrs-report-while-using-them-in-dashboard-crm-2011
alludes to appending the url with'&rc:Toolbar=false' which i cannot get to work. So any suggestions or am i left with modifying a css file?
Try &rv:Toolbar=false instead of &rc:Toolbar=false
This worked for me.
http://msdn.microsoft.com/en-us/library/ms152835.aspx
Additionally to the answer from
http://social.msdn.microsoft.com/Forums/sqlserver/en-US/6c4a0722-b7cc-4a77-9c28-95cb478b743f/remove-top-links-from-report-server
Please open the Report Manager folder.
In Reporting Services 2008 (R2), the folder is :\Program Files\Microsoft SQL Server\MSRS10_50.MSSQLSERVER\Reporting Services\ ReportManager.
Open the folder “Styles”.
Open the file “ReportingServices.css” using Text Editor such as Notepad.
Change the “table.msrs-topBreadcrumb” to be the following:
table.msrs-topBreadcrumb { background-color: #EBF3FF; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 84%; font-weight:normal; color:#666666;display:none}
And this I added myself :
.toolbarbuttonscell {display: none;}
Save the file.
One option that might work is to go view the report, go to IE tools->Compatibility view settings, and add the site that the report is viewed at.
Try amending the URL as below (adds 'ReportServer' and calls 'ReportViewer.aspx')
Examples:
https://devreports01/ReportServer_INST01/Pages/ReportViewer.aspx?ReportName
https://devreports01/Reports_INST01/Pages/Report.aspx?ItemPath=ReportName
I noticed that the window loaded after deployment did not include the toolbar and this was because of the URL. Seems to be the easiest way to lose the toolbar.
Follow the link to hide toolbar
LINK
I have implemented by using the below report url
http://servername:port/ReportServer/Pages/ReportViewer.aspx?ReportFolderWithReportName&rs:Command=Render&rc%3aCommand=Render&rc%3aLinkTarget=_blank
Instead of this
http://servername:port/Reports/Pages/Report.aspx?ItemPath=ReportFolderWithReportName&rs:Command=Render&rc%3aCommand=Render&rc%3aLinkTarget=_blank
For mobile reports add this as a query string parameter
rs:embed=true
You can do this configuring the object with c#, setting the "ShowToolBar" option to false. Find the file "you_report.apsx.cs" and modify the "LoadReport" action, like this:
private void LoadReport() {
this.rptViewer.ProcessingMode = Microsoft.Reporting.WebForms.ProcessingMode.Local;
rptViewer.LocalReport.ReportPath = Server.MapPath("~/path_to_you_report.rdlc");
rptViewer.LocalReport.DataSources.Add(datasource);
rptViewer.ShowToolBar = false; //This hide the toolbar
rptViewer.ServerReport.Refresh();}
Update:rptViewer.ShowToolBar = false does not work with SSRS 2016
try instead rptViewer.ShowParameterPrompts = false; it Worked for me

Resources