Jump to content

Quoted text styling


Recommended Posts

Trying to change the style of quoted text in the Notes tab in the Admin area.

It looks like the text is wrapped in the <blockquote> tag with no id, class or any other identifiers.

Is there anything specific that needs to be written in custom.css?

Adding blockquote style doesn't do anything at all. Tested by editing blockquote style via inspecting the element and that changes the text just fine.

Link to comment
Share on other sites

49 minutes ago, John Kennedy said:

It looks like the text is wrapped in the <blockquote> tag with no id, class or any other identifiers.

sadly, that's not a unique occurrence in WHMCS.

50 minutes ago, John Kennedy said:

Is there anything specific that needs to be written in custom.css?

if you're thinking of custom.css in the Six folder, then that is for the client area only...

four years ago, I did post a hook that would allow you to use a custom.css file in the admin area for a similar purpose..

.. and if you were making a lot of css changes to the admin area, and could specify the exact element that you want to change via CSS, then that's the path i'd probably go down.

however, if it were just a one-off, or a specific task for a specific page, then you could make a hook for that purpose, e.g to change the blockquote formatting on the notes page.

<?php
function admin_notes_blockquote_css_hook($vars)
{	
	if ($vars['filename'] == 'clientsnotes') {
		$head_return = '<style>blockquote {color: red;}</style>';
		return $head_return;
	}
}
add_hook("AdminAreaHeadOutput",1,"admin_notes_blockquote_css_hook");

depending on what you want to do to the blockquote styling, you might have to throw in the odd !important should it need a little gentle persuasion. 🙂

Link to comment
Share on other sites

Thanks for that!

I believe adding a hook for a single file would be a better solution in the long run as I won't have to rewrite the hook every time I want change things to make them more readable or stand out more.

<?php

function admin_custom_css_hook($vars) {

   $currenttemplate = $vars['template'];
   $head_return = '';
   $head_return = '<link href="templates/'.$currenttemplate.'/custom.css" rel="stylesheet" type="text/css" />';
   return $head_return;
}
add_hook("AdminAreaHeadOutput",1,"admin_custom_css_hook");

Should give me a clean option.

Edited by John Kennedy
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated