effi10
Forum Replies Created
-
Hi
I have the same issues (problem with lists, groups, etc. ; it looks like UTF-8 characters do not write correctly)
I had to rollback to 2.8.5 to have a clean result.
Great 🙂
Yes, it works !!!
Thanks 🙂
Forum: Plugins
In reply to: [Photo Engine (Media Organizer & Lightroom)] Collections are duplicated :-((nop)
Sorry 🙂
Forum: Plugins
In reply to: [TooltipGlossary] [Plugin: TooltipGlossary] Problem with existing linksWith this code, you’ll have never links on :
– links
– alt, title, src, href attribute
– H1 … H6
– script, embedBut you’ll have only ONE link for each term on each page/article, and you will not have ehanced tooltips.
It works on 3.0.5 version of WordPress 🙂
And excuse me for my bad english ^_^
Forum: Plugins
In reply to: [TooltipGlossary] [Plugin: TooltipGlossary] Problem with existing linksHi
I’ve made a “big” updateon the code, but I’ve lost some functionalities :
– only the first instance is linked
– any links on H1, H2, H3, H4, H5, H6, links, attributes, etc.I picked up the code in another plugin and i’ve adapted it.
function red_glossary_parse($content){ //Run the glossary parser if (((!is_page() && get_option('red_glossaryOnlySingle') == 0) OR (!is_page() && get_option('red_glossaryOnlySingle') == 1 && is_single()) OR (is_page() && get_option('red_glossaryOnPages') == 1))){ $glossary_index = get_children(array( 'post_type' => 'glossary', 'post_status' => 'publish', 'order' => 'DESC', 'orderby' => 'title' )); if ($glossary_index){ $timestamp = time(); foreach($glossary_index as $glossary_item) { $find = '/'.$glossary_item->post_title.'/i'; $titlefind= $glossary_item->post_title; $isFind = false; $matches = array(); preg_match_all($find, $content, $matches, PREG_OFFSET_CAPTURE); $matchData = $matches[0]; $noChanges = array( '/<h[1-6][^>]*>[^<]*'.$glossary_item->post_title.'[^<]*<\/h[1-6]>/i', '/<a[^>]+>[^<]*'.$glossary_item->post_title.'[^<]*<\/a>/i', '/href=("|\')[^"\']+'.$glossary_item->post_title.'(.*)[^"\']+("|\')/i', '/src=("|\')[^"\']*'.$glossary_item->post_title.'[^"\']*("|\')/i', '/alt=("|\')[^"\']*'.$glossary_item->post_title.'[^"\']*("|\')/i', '/title=("|\')[^"\']*'.$glossary_item->post_title.'[^"\']*("|\')/i', '/content=("|\')[^"\']*'.$glossary_item->post_title.'[^"\']*("|\')/i', '/<script[^>]*>[^<]*'.$glossary_item->post_title.'[^<]*<\/script>/i', '/<embed[^>]+>[^<]*'.$glossary_item->post_title.'[^<]*<\/embed>/i', '/wmode=("|\')[^"\']*'.$glossary_item->post_title.'[^"\']*("|\')/i' ); foreach($noChanges as $noChange){ $results = array(); preg_match_all($noChange, $content, $results, PREG_OFFSET_CAPTURE); $matches = $results[0]; if(!count($matches) == 0) { foreach($matches as $match){ $start = $match[1]; $end = $match[1] + strlen($match[0]); foreach($matchData as $index => $data){ if($data[1] >= $start && $data[1] <= $end){ $matchData[$index][2] = true; } } } } } foreach($matchData as $index => $match){ if($match[2] != true){ $isFind = $match; break; } } if(is_array($isFind)){ $replacement = '<a class="glossaryLink" href="'.get_permalink($glossary_item).'"'; $replacement = $replacement.'title="Glossary : '.$titlefind.'" >'.$isFind[0].'</a>'; $content = substr($content, 0, $isFind[1]) . $replacement . substr($content, $isFind[1] + strlen($isFind[0])); } } } } return $content; }You have to modify the code to insert the tooltips ehanced version…
Hello
If roles aren’t important for you, you just have to comment line 135 in more-types-object.php file 😉

