Welcome, Guest
Username: Password: Remember me
Post about the Gnosis Plugin here.

TOPIC: Plugin recreation

Plugin recreation 4 years 9 months ago #4043

  • arsenal
  • arsenal's Avatar
  • OFFLINE
  • New Member
  • Posts: 2
  • Karma: 0
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:
The administrator has disabled public write access.

Plugin recreation 4 years 9 months ago #4044

  • arsenal
  • arsenal's Avatar
  • OFFLINE
  • New Member
  • Posts: 2
  • Karma: 0
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: 4 years 9 months ago by arsenal.
The administrator has disabled public write access.

Plugin recreation 4 years 9 months ago #4046

  • admin
  • admin's Avatar
  • OFFLINE
  • Administrator
  • Posts: 82
  • Thank you received: 5
  • Karma: 5
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.
The administrator has disabled public write access.

Plugin recreation 3 years 3 months ago #4289

  • changzhao
  • changzhao's Avatar
  • OFFLINE
  • New Member
  • Posts: 7
  • Karma: 0
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.0.10_2015-04-22.zip
File Size: 8 KB
Last Edit: 3 years 3 months ago by changzhao. Reason: updated zip
The administrator has disabled public write access.
Time to create page: 0.136 seconds