OJS OCS OMP OHS

You are viewing the PKP Support Forum | PKP Home Wiki



Animate ANNOUNCEMENTS

Are you responsible for making OJS work -- installing, upgrading, migrating or troubleshooting? Do you think you've found a bug? Post in this forum.

Moderators: jmacgreg, btbell, michael, bdgregg, barbarah, asmecher

Forum rules
What to do if you have a technical problem with OJS:

1. Search the forum. You can do this from the Advanced Search Page or from our Google Custom Search, which will search the entire PKP site. If you are encountering an error, we especially recommend searching the forum for said error.

2. Check the FAQ to see if your question or error has already been resolved.

3. Post a question, but please, only after trying the above two solutions. If it's a workflow or usability question you should probably post to the OJS Editorial Support and Discussion subforum; if you have a development question, try the OJS Development subforum.

Animate ANNOUNCEMENTS

Postby kennymatthew » Tue Apr 30, 2013 10:31 pm

Hi,

I wanted to know why I cannot use HTML tags like
<marquee behavior="slide" direction="left">welcome </marquee>
to animate the announcements in OJS. when i open the HTML editor and save the line it gets replaced with just plain text. Please advice.
kennymatthew
 
Posts: 127
Joined: Wed Jan 09, 2013 11:49 pm

Re: Animate ANNOUNCEMENTS

Postby JasonNugent » Wed May 01, 2013 3:17 am

Hi Kenny,

We use HTMLPurifier to restrict what HTML can be used in fields that allow rich content. If you want to use the marquee element, you'll need to add it to the list of allowed HTML tags in your config.inc.php file, as specified by allowed_html.

Regards,
Jason
JasonNugent
Site Admin
 
Posts: 848
Joined: Tue Jan 10, 2006 6:20 am

Re: Animate ANNOUNCEMENTS

Postby kennymatthew » Wed May 01, 2013 11:37 pm

Hi Jason,

I had tried that ....

allowed_html = "<a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd> <b> <i> <u> <img src|alt> <sup> <sub> <br> <p> <marquee behavior|direction>"

Still cant use marquee.
kennymatthew
 
Posts: 127
Joined: Wed Jan 09, 2013 11:49 pm

Re: Animate ANNOUNCEMENTS

Postby JasonNugent » Thu May 02, 2013 4:06 am

Hi Kenny,

Are you editing a template with an HTML editor outside of OJS and then uploading it? Or are you using a rich text field within OJS that is using TinyMCE? Just want to be sure I'm thinking of the same thing.

Regards,
Jason
JasonNugent
Site Admin
 
Posts: 848
Joined: Tue Jan 10, 2006 6:20 am

Re: Animate ANNOUNCEMENTS

Postby kennymatthew » Sat May 04, 2013 9:41 pm

Hi Jason,

I write my HTML code in notepad++ then copy it to the OJS text field after selecting the "edit html source" button.

Regards,
Kenny
kennymatthew
 
Posts: 127
Joined: Wed Jan 09, 2013 11:49 pm

Re: Animate ANNOUNCEMENTS

Postby JasonNugent » Tue May 07, 2013 3:47 am

Hi Kenny,

Which OJS text field? I'm going to test locally.

Regards,
Jason
JasonNugent
Site Admin
 
Posts: 848
Joined: Tue Jan 10, 2006 6:20 am

Re: Animate ANNOUNCEMENTS

Postby kennymatthew » Tue May 07, 2013 11:13 pm

Hi Jason,

Home > User > Journal Management > Announcements > Create > text field short description .... for a temp solution I did the below... but it only works on chrome ....

1. In text field
----------------------------------------------------
<div class="marquee"><p>And today's weather will be... FINE!</p></div>

----------------------------------------------------


2.In the css file
---------------------------------------------------
.marquee {

/*chrome*/
overflow-x: -webkit-marquee;
-webkit-marquee-direction: backwards;
-webkit-marquee-style: slide;
-webkit-marquee-speed: normal;
-webkit-marquee-increment: medium;
-webkit-marquee-repetition: 6;
color: red;
font-weight:bold;
}
-------------------------------------------------------
kennymatthew
 
Posts: 127
Joined: Wed Jan 09, 2013 11:49 pm

Re: Animate ANNOUNCEMENTS

Postby JasonNugent » Wed May 08, 2013 4:35 am

Hi Kenny,

The problem stems from the fact that the marquee tag is no longer considered a valid HTML tag. It was removed from the specification and by default, TinyMCE does not allow invalid HTML. You can circumvent this feature by editing the TinyMCEPlugin.inc.php file in plugins/generic/tinymce and adding an extra line to the tinyMCE.init codeblock:

Code: Select all
tinyMCE.init({
   ....
   extended_valid_elements : "marquee",
   ....
});



Regards,
Jason
JasonNugent
Site Admin
 
Posts: 848
Joined: Tue Jan 10, 2006 6:20 am

Re: Animate ANNOUNCEMENTS

Postby kennymatthew » Wed May 08, 2013 11:40 pm

Hi Jason,

A BIG THANK YOU..... that was really helpful.
kennymatthew
 
Posts: 127
Joined: Wed Jan 09, 2013 11:49 pm

Re: Animate ANNOUNCEMENTS

Postby kennymatthew » Thu May 09, 2013 1:30 am

Hi jason,

1 last doubt. Tinymce doesnt allow <script> and <style> tags it comments them when i try soo if i add this will it resolve the issue?

Code: Select all
extended_valid_elements : "marquee,script[src|type|language],style",
kennymatthew
 
Posts: 127
Joined: Wed Jan 09, 2013 11:49 pm

Re: Animate ANNOUNCEMENTS

Postby JasonNugent » Thu May 09, 2013 4:31 am

hi Kenny,

That should do it, yes. If I was doing this, though, I'd include a script element in my OJS header template so I have it available site-wide. And then I'd add class or id elements to those tags that I wanted to mark up individually and just extend the CSS framework instead of doing it in-line with a style element. That's one of the reasons why the marquee element is out of the specification. You can do that sort of thing with CSS, like with jQuery's slide() animation. It's far more cross-browser compatible.

Regards,
Jason
JasonNugent
Site Admin
 
Posts: 848
Joined: Tue Jan 10, 2006 6:20 am

Re: Animate ANNOUNCEMENTS

Postby kennymatthew » Sat May 11, 2013 10:14 pm

Hi Jason,


Thanks again for the advice.. will try it out ...
kennymatthew
 
Posts: 127
Joined: Wed Jan 09, 2013 11:49 pm


Return to OJS Technical Support

Who is online

Users browsing this forum: Google [Bot] and 3 guests

cron