Keyword

Enter script ads in k2 item

  • mridul
  • mridul's Avatar Topic Author
  • Offline
  • New Member
More
11 years 3 months ago #114496 by mridul
Enter script ads in k2 item was created by mridul
Hi

i want to add ads(starts with <script> tag) in k2 item.Adverts will be mixing with item texts.Problem is that k2 article not taking code starting with script tag like "<script>ad code</script>" !! plz help and suggest alternatives.

Thanks in advance

Please Log in or Create an account to join the conversation.

  • Mohamed Abdelaziz
  • Mohamed Abdelaziz's Avatar
  • Offline
  • Platinum Member
  • Joomla Developer
More
11 years 3 months ago #114497 by Mohamed Abdelaziz
Replied by Mohamed Abdelaziz on topic Re: Enter script ads in k2 item
Hi mirdul,

You can enter this script in item.php file, or you can use modules to run the script, and the loadposition plugin to load modules anywhere within the content if you want to mix content with ads.

Multiple Extra Fields Groups for K2
AutoMeta for K2
Chained Fields for K2
More K2 Extensions In My Extensions Store

Please Log in or Create an account to join the conversation.

More
11 years 3 months ago - 11 years 3 months ago #114498 by Alex Haynes
Replied by Alex Haynes on topic Re: Enter script ads in k2 item
So in a K2 Item, I cannot toggle the WSIWYG editor to view the html and add <script> code there? Well, I know I can't because when I hit save that code vanishes. So, there is no workaround or plugin to add javascript inside a K2 item?

Update: I attempted to create a module for the javascript using the Custom Html module and the <script> tags are still deleted. as they were in the K2 Item. Is this a K2 problem or Joomla setting that I am not aware of.

Thanks.

Please Log in or Create an account to join the conversation.

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
11 years 3 months ago #114499 by Krikor Boghossian
Replied by Krikor Boghossian on topic Re: Enter script ads in k2 item
Hello Alex,

This is not related to Joomla! or K2, this is a setting in your WYSIWYG editor.
By default the editor strips all the <script> tags.

Also for JS code in your modules you have to use the K2 Tools module (custom code functionality).

I do however suggest the solution that Mohamed suggested.

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

Please Log in or Create an account to join the conversation.


Powered by Kunena Forum