[pmwiki-users] Popup messages

IchBin weconsul at ptd.net
Sun Oct 29 02:42:28 CST 2006


Stirling Westrup wrote:
> IchBin wrote:
>> Say I have a paragraph of text or a list of terms displayed on a page. 
>> In that paragraph or list I may have n->terms that I would like to be 
>> able to display its definition. I really do not want to load a page of 
>> definitions and then reference directly to it with a [[#term]]. I would 
>> like to stay on the same page as the term.
>>
>> When the user hovers over a term I can popup a small message window with 
>> its definition. Something on the lines of a queued process on a word 
>> hover. Then I guess it would be more like a XMLHttpRequest call. Hope my 
>> question make sense.
>>
>> Just wondering if there are any recipes, or part of a recipe, that could 
>> help me or get me going in the right direction? Do people build recipes 
>> that can utilize javascript.  Sorry, I do not have a clue.
> 
> My recently completed QuickReplace recipe can do 90% of that work.
> 
>   http://www.pmwiki.org/wiki/Cookbook/QuickReplace
> 
> It allows you to associate keys with values using a configuration
> wiki-page and lets there be a custom output format for inserting the
> results in a page. You would end up editing Site.Terms (or something
> similar) and putting in terms and definitions like:
> 
> 'holomorphic function' => 'Holomorphic functions are the central object
> of study of complex analysis; they are functions defined on an open
> subset of the complex number plane C with values in C that are
> complex-differentiable at every point. This is a much stronger condition
> than real differentiability and implies that the function is infinitely
> often differentiable and can be described by its Taylor series. The term
> analytic function is often used interchangeably with "holomorphic
> function", although note that the former term has several other
> meanings. A function that is holomorphic on the whole complex plane is
> called an entire function. The phrase "holomorphic at a point a" means
> not just differentiable at a, but differentiable everywhere within some
> open disk centered at a in the complex plane.'
> 
> You would then create a QuickReplace instance in your local/config.php
> by entering something like:
> 
> $QuickReplace['Terms'] = array
>   ( 'output' => '<mysterious $1 html $2 stuff>'
>   );
> include_once("cookbook/quickreplace.php");
> 
> Then whenever you used the words "holomorphic function" in a page, they
> would be replaced by <mysterious $1 html $2 stuff>, with the $1 and $2
> replaced by that term and its definition.
> 
> The problem is, I don't know what HTML/javascript/whatever you would use
> to create a popup that behaved like you wished. If you could tell me
> that, I could probably give you a working recipe.

Thanks Stirling for the info. I think the recipe called DomTT, which 
Dominique mentioned earlier tonight, maaay do the trick.

Just to step back for a second. When Dominique mentioned DomTT. For some 
reason I made no connection to a pmWiki Cookbook recipe. With that name 
I immediately googled the Internet and came back with this link: 
http://www.mojavelinux.com/projects/domtooltip

As it turns out this open source product is used by a recently created 
recipe called, naturally, DomTT.  Oh, by the way, I really think that 
you should look at the product. It will answer any questions you may 
have about any code requirements.

Short story longer, I continued to play with the DomTT product and found 
it far surpassed my design plans and expectations.

Getting back to the DomTT recipe it looks good. I am just being side 
tracked because I have highly formated data that I can not pass into the 
recipe markup. Dom maybe you can answer this. I have not started to 
debug yet. Any way with the simple setup at min using this, without 
passing options it works fine.

 >>comment id=default_enable_div<<
    If this setting is On then stacktraces will be shown by default on an
    error event. You can disable showing stacktraces from your code with
    xdebug_disable(). As this is one of the basic functions of Xdebug, it
    is advisable to leave this setting set to 'On'.
 >><<

[:default_enable_div:xdebug.default_enable]

Ok, below is what the actual data looks like with all the formating.

%color=#ff7f00 define=directive%
|| ||xdebug@@'''.%directive%default_enable'''@@ ||On ||

The problem I have is the actual data format I have to pass is a 
problem. Can not seem to get the term hat need to be define in a tooltip 
to format correctly. Also I can not use the two double lines under the 
target term.

You could go to this page to see what the current output looks like:
http://weconsultants.phpnet.us/pmwiki.php/PHP/Debugging#xdebug

I am trying to blend in the popup with out affecting my current page format.

Hope this makes sense of what the problem I am having..

-- 
Thanks in Advance...                  http://ichbin.9999mb.com
IchBin, Pocono Lake, Pa, USA          http://weconsultants.phpnet.us
______________________________________________________________________
'If there is one, Knowledge is the "Fountain of Youth"'
-William E. Taylor, Regular Guy (1952-)





More information about the pmwiki-users mailing list