Keyword

[SOLVED] Pinterest widget board

  • Katia Motta
  • Katia Motta's Avatar Topic Author
  • Offline
  • New Member
More
10 years 3 months ago #129905 by Katia Motta
[SOLVED] Pinterest widget board was created by Katia Motta
Hi everybody,
I would like to embed a Pinterest board into a K2 item.
I copied and pasted the script released by Pinterest, but no way...
Is there a problem with Javascript?
Is there anyone who can give me any hint?
Thanks a lot
Katia

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

More
10 years 3 months ago #129906 by Lefteris
Replied by Lefteris on topic Re: Pinterest widget board
Hi. Is there a link to your site? Where have you copied the script?

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

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

  • Katia Motta
  • Katia Motta's Avatar Topic Author
  • Offline
  • New Member
More
10 years 3 months ago #129907 by Katia Motta
Replied by Katia Motta on topic Re: Pinterest widget board
I copied the script released by Pinterest and including my Pinterest board as follows:

<a data-pin-do="embedBoard" href="www.pinterest.com/bassastyle/cavezzo-vecchi-merletti/" data-pin-scale-width="115" data-pin-scale-height="120" data-pin-board-width="900">
<!-- Please call pinit.js only once per page -->
<script type="text/javascript" async src="//assets.pinterest.com/js/pinit.js"></script>

What it produces when pasted into a K2 item is just a simple link to the Pinterest board and no board embedding at all.
Does it have to do with Javascript settings?

Thanks for replying :)

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

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
10 years 3 months ago #129908 by Krikor Boghossian
Replied by Krikor Boghossian on topic Re: Pinterest widget board
It is more of an editor setting.
Editors usually strip js tags. You can either tweak your editor's settings or you can use a custom HTML module/ k2 Tools module and use the {loadposition} method.

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

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

  • Katia Motta
  • Katia Motta's Avatar Topic Author
  • Offline
  • New Member
More
10 years 3 months ago #129909 by Katia Motta
Replied by Katia Motta on topic Re: Pinterest widget board
Thanks very much Krikor!
Only thing I did not catch is the {loadposition} method. What do you mean?
In facts, I am also trying to guess how to place this embedded Pinterest board inside a K2 item.
Are you so kind and indicate me a good solution?
Katia

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

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
10 years 3 months ago #129910 by Krikor Boghossian
Replied by Krikor Boghossian on topic Re: Pinterest widget board
Hello Katia,

This is what I mean: docs.joomla.org/How_do_you_put_a_module_inside_an_article%3F

This will also work for K2 items.

If you wish to publish the same board in all K2 items, then this solution is not for you.
You should search this board to see how to

a) Override your item.php file
b) Place modules outside your index.php file.

If you choose to override this post will help you.
nuevvo.com/blog/item/84-k2-inheritance-sub-templating

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

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

  • Katia Motta
  • Katia Motta's Avatar Topic Author
  • Offline
  • New Member
More
10 years 3 months ago #129911 by Katia Motta
Replied by Katia Motta on topic Re: Pinterest widget board
Thanks Krikor!
I was able to embed the Pinterest board into the K2 item.
Now, what shall I do if I want each K2 item/article to have its own correspondent Pinterest board embedded?
Basically: 1 article = 1 board.
Sorry for bothering you again, but I feel we are now close to the solution! :)

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

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
10 years 3 months ago #129912 by Krikor Boghossian
Replied by Krikor Boghossian on topic Re: Pinterest widget board
You are not bothering me at all.
If you want each item to have its own board, then pasting the code in the editor sounds like a good solution.

Having 400 items and 400 modules doesn't sound really good.

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

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

  • Katia Motta
  • Katia Motta's Avatar Topic Author
  • Offline
  • New Member
More
10 years 3 months ago #129913 by Katia Motta
Replied by Katia Motta on topic Re: Pinterest widget board
You are possibly right Krikor, but this is where all the problem began.
My first attempt was to copy and paste the code directly into the item editor.
But the item in the frontend was showing just a link to the board, no widget; now that I am trying to have it pasted into the same page as the board module I created following your instructions, what you see from the fronted is the code itself! :dry:
I am using Joomla 3.2.4, by the way.
Any hint..? :blink:

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

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
10 years 3 months ago #129914 by Krikor Boghossian
Replied by Krikor Boghossian on topic Re: Pinterest widget board
Sure, each editor has its settings, either on the plugin or if you are using JCE on the component view.

You have to make sure that <script> tags are allowed and not stripped.
In TinyMCE's settings (plugin settings) you need to remove script from the "Prohibited Elements" list.

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