Whilst small files can be uploaded to forum posts, if you have a custom theme or module to contribute please add it on the "Add-ons" page.
  • Page:
  • 1

TOPIC:

magicsunday peddigree chart modified to open a window 1 week 6 days ago #1

  • aim
  • aim's Avatar Topic Author
  • Offline
  • New Member
  • New Member
  • Posts: 7
Hi.
I m new here, i'm french, sorry for my english.
First thanks for this very nice script.

I use the module magicsunday peddigree chart. On click the module rebuild the tree from the individual, i would like to add on the individual box a link (an icon) to open a new window with the individual page information. I know PHP and HTML but not the javascript.
I try things but i didn't found.
If somebody can help me.

Thanks

Attachments:

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

magicsunday peddigree chart modified to open a window 1 week 5 days ago #2

  • Franz Frese
  • Franz Frese's Avatar
  • Offline
  • Premium Member
  • Premium Member
  • Posts: 828
you may ask magicsunday by an issue at the corresponding github page.

Perhaps you have to replace his "function getUrl(baseUrl, generations)"

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

Last edit: by Franz Frese.

magicsunday peddigree chart modified to open a window 1 week 5 days ago #3

  • hermann
  • hermann's Avatar
  • Offline
  • Premium Member
  • Premium Member
  • Posts: 861
This function is already implemented: click on a person in the tree, and now this person is the new base of the tree, click on this person again, and now the individual page of this person opens.
Hermann
Designer of the custom module "Extended Family"

webtrees 2.1.16 (all custom modules installed, PHP 8.2, MySQL 5.7) @ ahnen.hartenthaler.eu

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

magicsunday peddigree chart modified to open a window 1 week 5 days ago #4

  • aim
  • aim's Avatar Topic Author
  • Offline
  • New Member
  • New Member
  • Posts: 7
@Hermann
yes i know and i want to keep this tree function , but i need to directly opening a NEW window with a link too. This because it's easier to navigate between the tree and the page information.

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

magicsunday peddigree chart modified to open a window 1 week 5 days ago #5

  • aim
  • aim's Avatar Topic Author
  • Offline
  • New Member
  • New Member
  • Posts: 7
@Franz thanks i will search it

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

Last edit: by aim.

magicsunday peddigree chart modified to open a window 1 week 5 days ago #6

  • Franz Frese
  • Franz Frese's Avatar
  • Offline
  • Premium Member
  • Premium Member
  • Posts: 828
I would simply install the GVExport and use that. The click there on a person already opens in a new window.

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

magicsunday peddigree chart modified to open a window 1 week 5 days ago #7

  • fisharebest
  • fisharebest's Avatar
  • Offline
  • Administrator
  • Administrator
  • Posts: 17129
You could use the solution from here: webtrees.net/faq/target/

Just change the logic that matches which URLs to handle.
Greg Roach - This email address is being protected from spambots. You need JavaScript enabled to view it. - @fisharebest@phpc.social - fisharebest.webtrees.net

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

magicsunday peddigree chart modified to open a window 1 week 5 days ago #8

  • Franz Frese
  • Franz Frese's Avatar
  • Offline
  • Premium Member
  • Premium Member
  • Posts: 828

You could use the solution from here: webtrees.net/faq/target/

Just change the logic that matches which URLs to handle.
I suppose a global change is not wanted (only for that module).
The solution above is only for external links. (these do not occure in magicsundays module)

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

Do you need a web hosting solution for your webtrees site?
If you prefer a host that specialises in webtrees, the following page lists some suppliers able to provide one for you: 

magicsunday peddigree chart modified to open a window 1 week 5 days ago #9

  • fisharebest
  • fisharebest's Avatar
  • Offline
  • Administrator
  • Administrator
  • Posts: 17129
> The solution above is only for external links

Hence my suggestion to change the logic for matching URLs.

Instead of matching external URLs, match ones containing the desired module URL
Greg Roach - This email address is being protected from spambots. You need JavaScript enabled to view it. - @fisharebest@phpc.social - fisharebest.webtrees.net

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

magicsunday peddigree chart modified to open a window 1 week 5 days ago #10

  • aim
  • aim's Avatar Topic Author
  • Offline
  • New Member
  • New Member
  • Posts: 7
hi.
I installed GVexport, it's not work well. But is not what i search. I just want to make it easier to go back and forth between the tree and the individual records.

I'm looking at fisharebest's proposal

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

Last edit: by aim.

magicsunday peddigree chart modified to open a window 1 week 5 days ago #11

  • aim
  • aim's Avatar Topic Author
  • Offline
  • New Member
  • New Member
  • Posts: 7

You could use the solution from here: webtrees.net/faq/target/

Just change the logic that matches which URLs to handle.

I added the script in the body section of default.phtml, i can see it in the source page, it don't works :( , the link open in the same windows

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

magicsunday peddigree chart modified to open a window 1 week 5 days ago #12

  • aim
  • aim's Avatar Topic Author
  • Offline
  • New Member
  • New Member
  • Posts: 7
in the module i think the script is here:
function(){t.personClick(e.data)}))}))}personClick(t){1!==t.generation?this.redirectToIndividual(t.url):this.update(t.updateUrl)}redirectToIndividual(t){window.location=t}update(t){window.location=t}}

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

magicsunday peddigree chart modified to open a window 1 week 5 days ago #13

  • Franz Frese
  • Franz Frese's Avatar
  • Offline
  • Premium Member
  • Premium Member
  • Posts: 828

...I added the script in the body section of default.phtml...
Why didn't you try the "CSS and JS" of the control panel?

...I installed GVexport, it's not work well. ...
Can you give more details about "not working well"?

...I just want to make it easier to go back and forth between the tree and the individual records....
Use your browser functions (with right mouse button)

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

Last edit: by Franz Frese.

magicsunday peddigree chart modified to open a window 1 week 4 days ago #14

  • aim
  • aim's Avatar Topic Author
  • Offline
  • New Member
  • New Member
  • Posts: 7

Why didn't you try the "CSS and JS" of the control panel?

Can you give more details about "not working well"?

Use your browser functions (with right mouse button)

- I used it too, don't works
- there is a loop with a blank page.
- we can't use right click on the ajax magicsunday module.

i have posted a message on github.

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

Last edit: by aim.

magicsunday peddigree chart modified to open a window 1 week 4 days ago #15

  • Franz Frese
  • Franz Frese's Avatar
  • Offline
  • Premium Member
  • Premium Member
  • Posts: 828
> "- we can't use right click on the ajax magicsunday module."

Sorry for my imprecise expression: I mean the right mouse button together with the "go back" (or "go-forward") - arrow !

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

magicsunday peddigree chart modified to open a window 1 week 4 days ago #16

  • Franz Frese
  • Franz Frese's Avatar
  • Offline
  • Premium Member
  • Premium Member
  • Posts: 828
> "- there is a loop with a blank page."
did you post an issue for this at github page of gvexport?
What version are you using?

I use it already from the first version and did not see an error like this, so I recommend that module and I think it is very much prdestinated for your purpose!

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

  • Page:
  • 1
Powered by Kunena Forum