Ask your WordPress questions! Pay money and get answers fast! Comodo Trusted Site Seal
Official PayPal Seal

custom tooltips box or getting plugins to not conflict WordPress

  • SOLVED

Hello,

I am starting a language learning site. advancedkorean.com you learn korean through translated articles and notes accompanying them.

Because the lessons are quit long, I have it broken into Vocab and Article section, and have those sections hidden when not using them. I use the http://wordpress.org/extend/plugins/wp-showhide/ plugin for this.

I also have english translations appear above the korean text in the article section. I use the http://wordpress.org/extend/plugins/wp-tooltip/ plugin.

The problem is if text is inside the [showhide type="text"]text[/showhide] code the [tooltip content="text"]text[/tooltip] code gets disabled. (and so I can't hide the article section)

It is possible to do the same task without a plugin, as seen in the translations on this website;
http://www.chinasmack.com/2012/more/jokes-humor/men-women.html

the code used there is <span title="text">text</span>
But I can't get the tooltips box customization to work on my own site.

So please 1) figure out how to let me apply both plugins to the same text.
or 2) give me html / css / whatever code; to make a black box, with white text, at a defined width that will appear above the text and allow me to apply the show/hide plugin.

Answers (3)

2012-07-02

Christianto answers:

Hi Steve,

If you want to add other shortcode inside plugin "showhide" shortcode for example

[showhide type="text"]

This is [tooltip content="tooltip text"]Tooltips[/tooltip]

[/showhide]


since default plugin wont execute shortcode inside the shortcode content, you need to edit the wp-showhide.php on wp-showhide plugin folder line 68:
from
$output .= '<div id="'.$type.'-content-'.$post_id.'" class="'.$type.'-content" style="'.$hidden_css.'">'.$content.'</div>';
to
$output .= '<div id="'.$type.'-content-'.$post_id.'" class="'.$type.'-content" style="'.$hidden_css.'">'.do_shortcode( $content ).'</div>';

notice we use do_shortcode to execute any shortcode before it output
or you can replace the wp-showhide.php with file attach..


stevenwilson comments:

It didn't work on the article I have. But I made a small test one and it worked. http://www.advancedkorean.com/2012/07/02/test-2/

After I confirm it works on the actually article, I will award you the prize. : ) BRB.


stevenwilson comments:

You win. It works. How do I declare you the winner?


stevenwilson comments:

I'm pretty sure I have awarded you the money. Please post again if I have not.


Christianto comments:

Yes, you've award me the prize.. :D
Thanks Steve

2012-07-02

Romel Apuya answers:

i can help you on this.. we can cuztomise the plugin to avoid conflicts.


Romel Apuya comments:

how about adding a no conflict code on the header.php

jQuery.noConflict()


stevenwilson comments:

I placed that in the theme header.php in between <head> and </head> and nothing happened.


Romel Apuya comments:

can you provide me access to the ftp?


Romel Apuya comments:

ive seen you put it..but its inside the body.

try this one below.

<script type="text/javascript">

jQuery.noConflict()

</script>


stevenwilson comments:

I tried that as well. Didn't work.


Romel Apuya comments:

have you tried using the shortcodes in this manner


[tooltip content="text"]
[showhide type="text"]
text
[/showhide]
[/tooltip]


stevenwilson comments:

yes.

whichever shortcut is on the inside is disabled.


Romel Apuya comments:

i dont think wp supports executing a shortcode inside a shortcode

2012-07-02

Francisco Javier Carazo Gil answers:

Try to set WP_DEBUG to true and then maybe there are any problem with the name of some function.