Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Pages: 1
#1 2011-06-16 12:43:20
- Algaris
- Member
- From: England
- Registered: 2006-01-27
- Posts: 553
upm_quicktags
I thought I’d post a quick thread here as we’re not getting a lot of luck in the Plugin Archives form.
There seems to be an issue with upm_quicktags and version 4.4.0. Details can be found here and here
If anyone has any advise on how to fix it it be much appreciated. I’m not adverse to editing the plugin or configuration files but I’m no javascript or PHP expert.
Many thanks.
Offline
Re: upm_quicktags
Algaris wrote:
If anyone has any advise on how to fix it it be much appreciated.
I’ve not got the plugin to hand, but based on the line of JS you posted earlier and masa’s error message I’d hazard a guess that this’ll get rid of the warning:
if (write_tab && (jQuery("input[name='from_view']").val() == 'text'))
The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.
Txp Builders – finely-crafted code, design and Txp
Offline
#3 2011-06-16 13:29:31
- Algaris
- Member
- From: England
- Registered: 2006-01-27
- Posts: 553
Re: upm_quicktags
Hmmm…. No joy yet. Here’s the full code from the txp.js file
var write_tab = document.getElementById('write_tab');
var forms_tab = document.getElementById('forms_tab');
var pages_tab = document.getElementById('pages_tab');
if (write_tab || forms_tab || pages_tab)
{
var css = (document.createElementNS) ?
document.createElementNS(‘http://www.w3.org/1999/xhtml’, ‘link’) :
document.createElement(‘link’);
css.setAttribute(‘href’,‘upm_quicktags/style.css’);
css.setAttribute(‘type’,‘text/css’);
css.setAttribute(‘rel’,‘stylesheet’);
document.getElementsByTagName(‘head’)0.appendChild(css);
var current = false;
if (write_tab && document.article.from_view.value == ‘text’)
{
var body = document.getElementById(‘body’);
var excerpt = document.getElementById(‘excerpt’);
current = ‘body’;
upm_quicktags_toolbar(body);
if (excerpt)
{
upm_quicktags_toolbar(excerpt);
body.setAttribute('onclick', "current = 'body';");
excerpt.setAttribute('onclick', "current = 'excerpt';");
}
}
if (forms_tab)
{
current = 'form';
upm_quicktags_toolbar(document.getElementById('form'));
document.getElementById('upm_quicktags').style.width = toolbar_width;
}
if (pages_tab)
{
current = 'html';
upm_quicktags_toolbar(document.getElementById('html'));
document.getElementById('upm_quicktags').style.width = toolbar_width;
}
}
Offline
Re: upm_quicktags
Stef, your solution works for me. Initially, nothing seemed to change, but once I flushed the browser cache, the buttons appear fine.
I never knew about this plugin before— I saw it as a comment on Destry’s survey and decided to try it out.
Offline
Pages: 1