× Post about the Gnosis Plugin here.

Plugin recreation

  • arsenal
  • Topic Author
  • Offline
  • New Member
  • New Member
More
10 years 4 months ago #4043 by arsenal
Plugin recreation was created by arsenal
Hello,

I wish to make some changes to the plugin and extend its behavior till begin of december.

I will fix these efforts:
- Links get disturbed with this plugin, this is a no go - see picture attached
- Like Martin Bramptons Glossary this plugin should support ABBR
- There should be an option in the plugin config to use jQuery instead of PHP string manipulation for changes in the DOM
- There should be an option to limit the plugin execution to HTML selectors like P (so it won't work in links etc.)

Should I attach the plugin here?
Attachments:

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

  • arsenal
  • Topic Author
  • Offline
  • New Member
  • New Member
More
10 years 4 months ago - 10 years 4 months ago #4044 by arsenal
Replied by arsenal on topic Plugin recreation
My fix for Buttons and Links is here. Line 297
$i = 0;
			foreach ($arrSearch as $search) {
				$start = 0;
				while ($pos = strpos($article->text, $search, $start)) {
					for ($j = 0; $j<=300; $j++) { // Seek for Links
						if (substr($article->text, $pos-$j, 2) == '<a'
						|| substr($article->text, $pos-$j, 7) == '<button') {
							$link_found = true;
							break;
						} elseif (substr($article->text, $pos-$j, 2) == '<p') {
							$link_found = false;
							break;
						}
					}
					if ($link_found) {
						$link_found = false;
						$start = $pos + strlen($search);
					} else {
						$article->text = substr($article->text,0,$pos) .
										$arrReplace[$i] .
										substr($article->text,$pos+strlen($search),65555);
						$start = $pos + strlen($arrReplace[$i]);
					}
				}
				$i++;
			}

			// try to solve the replacement within replacement problem with the stro_replace functions
			// ^ Replacement for:
			//$article->text = $this->stro_replace1($arrSearch, $arrReplace, $article->text);
			
Last edit: 10 years 4 months ago by arsenal.

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

More
10 years 4 months ago #4046 by admin
Replied by admin on topic Plugin recreation
Hi arsenal. If you would like to attach the plugin here, that would be fine, and then after a review I could add it to the package. In fact, I would encourage anyone wanting to help with bugs, or wanting to include new features to submit their code. I want to get the plugin code to such a standard that it would be easy to develop other plugin tooltip styles. This one, for example, is pure css, but using javascript would allow more flexibility to use images or special effects.

Thanks for the initiative.

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

More
8 years 11 months ago - 8 years 11 months ago #4289 by changzhao
Replied by changzhao on topic Plugin recreation
Hi pals,
I hope Lander is well.
I add here the latest version of the plugin, let's call it v.1.0.10
  1. Changes by arsenal included,
  2. as well as I moved all the styles into CSS file, instead of injecting part of them in html;
  3. and changed the style of tooltip span to position: fixed; width: 80%; otherwise tooltip often was cut by the screen border, no good.

File Attachment:

File Name: gnosisplg1...4-22.zip
File Size:8 KB
Attachments:
Last edit: 8 years 11 months ago by changzhao. Reason: updated zip

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

Time to create page: 0.069 seconds