Jump to content
TNG Community

Any takers for these mods?


mkoche

Recommended Posts

Scott,

Using an include is what i was suggesting when I referred you to the Signature Display mod.  I guess I was too cryptic.  Even TNG is using an include in the getperson.php script to bring in the DNA Test information

It think it would be a lot easier if mod developers saved extensive modifications to TNG files as code snipper in the extensions folder and include the file from that location. If you choose to do that, please look at how I did it in the Signature Display mod and use the TNG variable $extspath for the extensions folder since users can rename that folder.

Note that I have not looked at the mod in question but wonder about the use of iframes being discussed.  I personally do not like iframes because you cannot tell what script is being executed.  TNG admin screen falls in the category.  Windows users can right click and launch that iframe only but that is not available in Apple environments that I can tell. 

Link to comment
Share on other sites

  • Replies 139
  • Created
  • Last Reply

Top Posters In This Topic

  • mkoche

    50

  • tngrlkrz

    34

  • Ken Roy

    26

  • Katryne

    21

Top Posters In This Topic

Posted Images

One question is about the extensions folder.  I know how to save in a folder in the mods area but does the mod user have to go an install the file itself???  It cannot be that way... or is it? I can look at your mod to try to follow the logic but I thought you might be able to guide me (lazy, I know).

As far as Iframes, I could not agree with you more.  I despise the way they function for a number of reasons from usability to security protections.  But they are the best implementation for what I wanted to do I could find.  Because of security violations, bringing in content is a no-no here.  Familysearch and google have whole api's that I could use... probably wiki does to but this goes beyond my own mandate.  So this was the easiest way I could settle on being able to include information.  Interestingly, this was not a research tools mod for me, I liked giving the user more information on surnames - and I will keep that functionality on my own site. 

Surnamedb went down yesterday and it showed me how hostage one could be to things outside the control of this mod.  It literally crashed my browser.  This is because I was checking for whether or not the information was on the website before I made the call (using curl).  No more of this.  I have settled to only use the most reliable sources and not to precheck any of them.  The result was nice.  Speed went drastically up.  And I learned my lesson.

Just an illustration of why Iframes with external info should be strongly avoided.  I have been thinking that a browser plugin might be a super option here too.  But, this is not for me to do!

Yes, include is my approach.  Just have to feel more comfortable with what is involved in using the extension folder.  I think it is just instructions that say, you need to put this file in your extensions folder.  Right?

Cheers,

Scott

 

 

 

 

Link to comment
Share on other sites

Both mods and extensions folder were added to TNG when the Mod Manager was incorporated into TNG in v8.  Both folders can be renamed in the Admin > Setup > General Settings > Paths and Folders. The Mod Manager in TNG v11.0.2 can handle the TNG folder variables $modspath and $extspath in target, newfile, and copyfile directives and in TNG v12 in the description section.

Small code snippets can be created using the newfile directive as done in the Signature Display mod.  Longer code snippets or complete code modules probably are better handled using a copyfile or copyfile2 directive.

25 minutes ago, mkoche said:

but does the mod user have to go an install the file itself??? 

Sorry I do not understand what you are asking

 

Link to comment
Share on other sites

As far as I know (which isn't that much) about the include, it doesn't need to call from the 'extensions' folder.  I have includes in my index.php  which merely are similar to this:

   include($cms['tngpath'] . "myroutine.php"); 

looking for the code in the tng root  (likely not the recommended way).  The files are copied there by the installation of the mod.  I should add that the reason I have includes in the index.php is because I have many user-switchable  templates, and this lets me mess with my homepage in just one place, and leave the unique code in the template folders themselves.

Personally, I have not used the extensions folder, but many mods do.

Ron

Link to comment
Share on other sites

If your code snippet is included as a function in another module, I find it best to put it in the extensions folder not to clutter the tng folder.  However if you include modules that require TNG services it is sometimes best to install the code in the TNG folder.

Link to comment
Share on other sites

Just a trivial observation: did a quick check of all cfgs I have installed, there are 131 includes used in 31 cfgs, and of those, only 31 includes use $extspath in 5 mods.  Over 40 are not using includes at all.  Some of the includes (I think of as subroutines, showing my age) are nested two deep as well, and may or not use TNG services,....don't know exactly what is or isn't such a service.

Ron

Link to comment
Share on other sites

2 hours ago, Ken Roy said:

  Windows users can right click and launch that iframe only but that is not available in Apple environments that I can tell. 

Macintosh users can also right click on a link to open it outside of an iFrame - eg in the TNG Admin area.

Roger

Link to comment
Share on other sites

1 hour ago, tngrlkrz said:

Just a trivial observation: did a quick check of all cfgs I have installed, there are 131 includes used in 31 cfgs, and of those, only 31 includes use $extspath in 5 mods.  Over 40 are not using includes at all.  Some of the includes (I think of as subroutines, showing my age) are nested two deep as well, and may or not use TNG services,....don't know exactly what is or isn't such a service.

Ron

Mod developers had minds of their own and so even though guidelines were published they were not necessarily followed, so analzing the mods for includes might not prove anything.

I would consider PHP function subroutines also.  And to me OOPS always meant Oops I forgot something...

I might have use TNG services incorrectly.  If you include a TNG module like tng_begin.php then trying to run that code from extensions folder might not work in all environments since the TNG modules might not be in the same location on all systems especially when WordPress is involved.. 

Link to comment
Share on other sites

Yay - I finished my list.

Well, except for uploading the mod.  For the second time I get this wonky editor (I assume it is a new one)... work my way through it and come to a screen that asks for a confirmation code with no explanation about what this is or where I get one.  Nothing comes in email, I find no helpful explanation and the wiki on the editor doesn't seem to have been touched in a long time.  So, maybe this is Karma telling me it is not the right time.

Nevertheless, I think I am at a good place. Implemented everything in my list. For the FamilySearch issue with logins, I couldn't solve it, but since it works fine in my computer browsers (but not on my ipad and not in Katryne's browser and since it is counter-intuitive either, I gave the option to only allow it for logged in users and put a tooltip to explain what you have to do with it. It works great on my browser and already helped me in my research.

I just put my include in the same folder with my graphics.  Did not want to worry too much about figuring it all out. 

Changed the graphics again...I read the FamilySearch policy and they discourage iframes but allow them.  They ask for their logo to be displayed, so I used it.  Did the same with wikipedia, and Google. 

The new file is pasted on the front of this forum. But I thought I would show what it looks like now:

When you open if you more than one search option chosen, this is how it looks:

Screen Shot 2019-03-09 at 1.20.57 AM.png

If you have only one option chosen it will just show that option.

Click on tools and you get this:

Screen Shot 2019-03-09 at 1.23.12 AM.png

The tooltip on familysearch attempts a quick explanation on how to use it.  The 'i' graphic is my attempt to indicate that there is information here... futile??? Note the red x closes this and returns to the single choice for research tools.

All the screens open at the same width. They have the same menu bar at the top. On the left a message to let you know that right clicking will open a link in a new window.  In the center, options to try different combinations of information about the individual and an option to open (only the starting window) in a new tab.  Screen Shot 2019-03-09 at 1.29.51 AM.png

A public visitor could get confused here particularly if they follow a link and want to open it in a new tab.  Any ideas on how to minimize this? 

Cheers,

Scott

 

 

 

Link to comment
Share on other sites

il y a 37 minutes, mkoche said:

not in Katryne's browser

It worked already with previous release, provided that I connected beforehand to FamilySearch. I am using SeaMonkey on Windows 10, but did not try this time on other browsers.

I download your new release and try it immediately. You have done a tremendous job.

Link to comment
Share on other sites

Scott posted the newly named mod 'Research Tools' in the first post of this thread.  It has the support folder included.

Ron

Link to comment
Share on other sites

ResearchTools is Ok by me. Of course, I keep having the error message when installing/uninstalling.

Citation

Warning: "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in /homepages/18/..../htdocs/tng12/classes/modparser.class.php on line 358
Warning: Cannot modify header information - headers already sent by (output started at /homepages/18/..../htdocs/tng12/classes/modparser.class.php:358) in /homepages/18/..../htdocs/tng12/admin_modhandler.php on line 194

But it causes no issue besides being compelled to click again on mod management , because I am stuck on this page.

Link to comment
Share on other sites

Scott,

Hope you got some shut eye. You've made many improvements in such short time.

 Like the layout.  Like that you now have a horizontal scrollbar in the popup.  The popup top bar option to open in new browser tab works great.

Only minor item noticed so far:  In Edit Options, if only 1 research tool (google, in my case) is selected, then nothing appears on the person page; not even the Research Tools icon.  But if at least one more tool is selected, then it is back and all works fine.  I had thought the intent was that, if only one tool selected, than that tool's link would appear immediately, w/o first the Research Tool link.

Suggestion: Also on Edit Options, I think all the dimensions should maybe be together so one doesn't need scroll past the long 'Add in your own Tree Search' instructions.

Other than that....very nice work!

Update: 

  1. Popup dimension changes made to top and left don't seem to have an effect, however, width seems to work fine.  (after closing browser, cleared cache, etc.).
  2. Is it possible to change the popup height  w/o doing it in the cfg file?   
  3. It would nice if the mod would remember what research links are to be posted between person pages that are loaded, thereby not having to click 'Research Tools' each time.  Or, in the case of only one tool selected in Edit Options, only that link appearing.
  4. One other issue just noticed in the google search.  If there is a '#' sign in the birth place, even though the spouse, mother or father appear in the top of the popup for insertion in the URL,  clicking will not insert anything into the google url.  If the '#' is removed, it will insert OK.

Ron

Link to comment
Share on other sites

22 minutes ago, Katryne said:

Warning: "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in /homepages/18/..../htdocs/tng12/classes/modparser.class.php on line 358

Interesting, I didn't get any such warnings.  Did you try the mod without any other mods installed, i.e., a clean system?  Just one of the first things I do when getting warnings/errors.

Ron

Link to comment
Share on other sites

No Ron, I did not try this way. I do not have any test site, I am no coder and I am not a quick one. I prefer not to do too many experiments on a living site.

Link to comment
Share on other sites

Katryne,

what error message are you getting, when and where?  I do not have the time to dig through all the previous posts.  Still trying to recover my desktop test environment.

Updated - OK I see where you indicate an error in the Mod Manager.  I will get Rick to look at it.  What PHP version are you running?

Link to comment
Share on other sites

12 hours ago, Ken Roy said:

Mod developers had minds of their own and so even though guidelines were published they were not necessarily followed, so analzing the mods for includes might not prove anything.

I would consider PHP function subroutines also.  And to me OOPS always meant Oops I forgot something...

Ken,

FWIW..Another benefit of using includes involves the process of 'trial and error' adjustments, especially if most of the code is in the code snippet  of the include.  One doesn't have to 'hunt' down the target php file, then the location code, to do 'on the fly' changes, then uninstall, change the cfg file, and re-install again.  This shortens the debug/development time, especially if you're in the localhost Wamp environment.

Ron

 

Link to comment
Share on other sites

Hi Ken !

I get this message on administration site, every time I install or uninstall this mod. It's on a new window, empty besides the admin site frame, without ability to come back to where I was, unless I click in the margin On the mod magement link. When I come pack to the mod magement, I can see the mod installed besides the other.

Information about my web site environment.
PHP version:  PHP 7.3.2
GD graphics library:  Available
Safe Mode:  Off
File Uploads:  Permitted
MySQL version:  MySQL mysqlnd 5.0.12-dev - 20150407 - $Id: 7cc7cc96e675f6d72e5cf0f267f48e167c2abb23 $ (client)
 MySQL 5.5.60-0+deb7u1-log (server)
Webserver: Apache
File/Folder Permissions:  Key folders are all read/write
Configuration files are all read/write

Link to comment
Share on other sites

Michael, fwiw, i installed the 3rd version (InfoHarvester3.zip) on a v11.1.2 site and it installed and runs fine, with no manipulation on my part... Have not tried the latest? researchtools.zip... Getting hard to figure out which is the latest (ha ha).

Link to comment
Share on other sites

3 minutes ago, stores said:

Michael, fwiw, i installed the 3rd version (InfoHarvester3.zip) on a v11.1.2 site and it installed and runs fine, with no manipulation on my part... Have not tried the latest? researchtools.zip... Getting hard to figure out which is the latest (ha ha).

 I agree it is not easy to find the latest when we do not know where they are being posted and this thread is already 6 pages long.  So maybe its time to start a new thread.

Link to comment
Share on other sites

Maybe a separate thread for each different mod.  I am trying to find the mod that is causing Katryne issues in Mod Manager with PHP 7.3 

Not easy to tell which mod when so many different mods are being discussed.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...