Web based family history software

Question A frame inside webtrees

  • Jacoline
  • Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
1 year 3 weeks ago #1 by Jacoline
A frame inside webtrees was created by Jacoline
I have some frames inside my system which I really want to bring to my wt-installation. But after 2 days trying to make the code for the frame I hope some can give me the code. (the KT-code use a controller - which I can not see here in wt) I am clever enough to copy but I am not Thomas Edison

Please mark - it is uppersit not a wt frame inside an another system. But an another page inside webtrees (this can solve some of my problems cause of lacking of the modules) I still hope somebody makes an "extra-menu" with subs!

Still a noob
(1st installation at 7-21-2010)

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

More
1 year 3 weeks ago #2 by hermann
Replied by hermann on topic A frame inside webtrees
Can you show us what you like to do? Otherwise, it is impossible to help.

Are you talking about adding content to an HTML block on My-Page or the start page of a tree? Show us the code and we can help, maybe.

Hermann
Designer of the custom module "Extended Family"

webtrees 2.1.21 (all custom modules installed, PHP 8.3.12, MariaDB 10.6) @ ahnen.hartenthaler.eu

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

  • Jacoline
  • Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
1 year 3 weeks ago - 1 year 3 weeks ago #3 by Jacoline
Replied by Jacoline on topic A frame inside webtrees
Thank you for responding!
I just want to do this (and no it is not working)
<?php
define('WT_SCRIPT_NAME', 'PERS.php');
require './includes/session.php';
$controller=new WT_Controller_Page();
$controller
->setPageTitle(WT_I18N::translate('PageName'))
->pageHeader()
->addInlineJavascript('
var iFrames = document.getElementsByTagName("iframe");
function iResize() {
iFrames.style.height = iFrames.contentWindow.document.body.offsetHeight + "px";
}
jQuery("iframe").load(function() {
this.style.height = this.contentWindow.document.body.offsetHeight + "px";
});
');
?>
<iframe id="myFrame" src="the-page-link" scrolling="no" frameborder="0" style="width:99%; min-height:600px;"></iframe>';

Still a noob
(1st installation at 7-21-2010)

Last edit: 1 year 3 weeks ago by Jacoline.

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

More
1 year 3 weeks ago #4 by fisharebest
Replied by fisharebest on topic A frame inside webtrees
In your code, this line:

document.getElementsByTagName("iframe");

comes before this line

<iframe...></iframe>

This means that when the first line executes, the iframe element does not exist.  Move the script to below the iframe.

Greg Roach - greg@subaqua.co.uk - @fisharebest@phpc.social - fisharebest.webtrees.net

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

  • Jacoline
  • Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
1 year 3 weeks ago #5 by Jacoline
Replied by Jacoline on topic A frame inside webtrees
Thank you - but page still blank :(

Still a noob
(1st installation at 7-21-2010)

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

More
1 year 3 weeks ago #6 by fisharebest
Replied by fisharebest on topic A frame inside webtrees
Do you see any messages in your browser's error console?

Greg Roach - greg@subaqua.co.uk - @fisharebest@phpc.social - fisharebest.webtrees.net

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

  • Jacoline
  • Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
1 year 3 weeks ago #7 by Jacoline
Replied by Jacoline on topic A frame inside webtrees
Yes this:
"use strict";
// Copyright 2012 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
var loadTimeData;
class LoadTimeData {
    constructor() {
        this.data_ = null
    }
    set data(value) {
        expect(!this.data_, "Re-setting data.");
        this.data_ = value
    }
    valueExists(id) {
        return id in this.data_
    }
    getValue(id) {
        expect(this.data_, "No data. Did you remember to include strings.js?");
        const value = this.data_[id];
        expect(typeof value !== "undefined", "Could not find value for " + id);
        return value
    }
    getString(id) {
        const value = this.getValue(id);
        expectIsType(id, value, "string");
        return value
    }
    getStringF(id, var_args) {
        const value = this.getString(id);
        if (!value) {
            return ""
        }
        const args = Array.prototype.slice.call(arguments);
        args[0] = value;
        return this.substituteString.apply(this, args)
    }
    substituteString(label, var_args) {
        const varArgs = arguments;
        return label.replace(/\$(.|$|\n)/g, (function(m) {
            expect(m.match(/\$[$1-9]/), "Unescaped $ found in localized string.");
            return m === "$$" ? "$" : varArgs[m[1]]
        }
        ))
    }
    getBoolean(id) {
        const value = this.getValue(id);
        expectIsType(id, value, "boolean");
        return value
    }
    getInteger(id) {
        const value = this.getValue(id);
        expectIsType(id, value, "number");
        expect(value === Math.floor(value), "Number isn't integer: " + value);
        return value
    }
    overrideValues(replacements) {
        expect(typeof replacements === "object", "Replacements must be a dictionary object.");
        for (const key in replacements) {
            this.data_[key] = replacements[key]
        }
    }
}
function expect(condition, message) {
    if (!condition) {
        throw new Error("Unexpected condition on " + document.location.href + ": " + message)
    }
}
function expectIsType(id, value, type) {
    expect(typeof value === type, "[" + value + "] (" + id + ") is not a " + type)
}
expect(!loadTimeData, "should only include this file once");
loadTimeData = new LoadTimeData;
window.loadTimeData = loadTimeData;
console.warn("crbug/1173575, non-JS module files deprecated.");
 

Still a noob
(1st installation at 7-21-2010)

Attachments:

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

More
1 year 3 weeks ago #8 by fisharebest
Replied by fisharebest on topic A frame inside webtrees
Maybe post a link where we can see this in action (or inaction!)

Greg Roach - greg@subaqua.co.uk - @fisharebest@phpc.social - fisharebest.webtrees.net

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

  • Jacoline
  • Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
1 year 3 weeks ago - 1 year 3 weeks ago #9 by Jacoline
Replied by Jacoline on topic A frame inside webtrees
inaction is now after adding htacces just a forward to "mypages" But I can pm you link and give you admin access if you need that (ftp I can not - I have not made that for this installation)

But how would you do a code if you want a frame in your webtrees? Ex. have my homepage as frame in your system? It is just general coding not specific for my installation (the links decide the specific code)

Still a noob
(1st installation at 7-21-2010)

Last edit: 1 year 3 weeks ago by Jacoline.

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

More
1 year 3 weeks ago #10 by Franz Frese
Replied by Franz Frese on topic A frame inside webtrees

inaction is now after adding htacces just a forward to "mypages" But I can pm you link and give you admin access if you need that (ftp I can not - I have not made that for this installation)
 
so your htaccess edit is wrong. you fall back to "mypages"

Jacoline post=102001 userid=2743
But how would you do a code if you want a frame in your webtrees? Ex. have my homepage as frame in your system? It is just general coding not specific for my installation (the links decide the specific code)

A frame reduces the availabe space on the display. I would never use (I see no need for a frame in any case). Instead you can do a link (with opening a new tab or window in the browser)

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

More
1 year 3 weeks ago #11 by fisharebest
Replied by fisharebest on topic A frame inside webtrees
> It is just general coding not specific for my installation

Many times iframes do not work because of server configuration. Do the HTTP headers of the embedded document allow it to be included in an iframe?

Greg Roach - greg@subaqua.co.uk - @fisharebest@phpc.social - fisharebest.webtrees.net

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

  • Jacoline
  • Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
1 year 3 weeks ago #12 by Jacoline
Replied by Jacoline on topic A frame inside webtrees
Yeah. The code works in kt. Same server

Still a noob
(1st installation at 7-21-2010)

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

  • Jacoline
  • Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
1 year 3 weeks ago #13 by Jacoline
Replied by Jacoline on topic A frame inside webtrees
The code did not work earlier. Before I made the ht. Just a blank page. And atleast I know things about htacces. And how to use it

Still a noob
(1st installation at 7-21-2010)

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

More
1 year 3 weeks ago #14 by Sir Peter
Replied by Sir Peter on topic A frame inside webtrees
Searching for "iframe" in this forum brings up www.webtrees.net/index.php/forum/help-fo...ay-iframe-tags#94283

Peter

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

  • Jacoline
  • Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
1 year 3 weeks ago #15 by Jacoline
Replied by Jacoline on topic A frame inside webtrees
Thank you. But my frames will not be inside the editor. It is some standalone in the root

Still a noob
(1st installation at 7-21-2010)

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

More
1 year 3 weeks ago #16 by Franz Frese
Replied by Franz Frese on topic A frame inside webtrees
Ich machs mal deutsch:
Wenn du deine Fragen so stellen würdest, dass man auch versteht, was du wirklich willst, dann wären alle deine Anfragen schon längst geklärt und wir müssten uns nicht jedesmal fragen, was du dir denn jetzt schon wieder ausgedacht hast. Für mich gilt solange: Hilf dir selbst!

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

  • Jacoline
  • Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
1 year 2 weeks ago #17 by Jacoline
Replied by Jacoline on topic A frame inside webtrees
I thourght I did. But it is not standard. Prolly the reason some have issues with my question

Still a noob
(1st installation at 7-21-2010)

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

More
1 year 2 weeks ago #18 by hermann
Replied by hermann on topic A frame inside webtrees
I'm completely lost. Please explain me: what is a frame inside webtrees that is a standalone in the root outside the editor?

Hermann
Designer of the custom module "Extended Family"

webtrees 2.1.21 (all custom modules installed, PHP 8.3.12, MariaDB 10.6) @ ahnen.hartenthaler.eu

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

More
1 year 2 weeks ago #19 by Franz Frese
Replied by Franz Frese on topic A frame inside webtrees

I'm completely lost. Please explain me: what is a frame inside webtrees that is a standalone in the root outside the editor?
Have a look a dfrese.de . There is just the opposite: webtrees as a frame (iframe) inside a wiki.

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

Powered by Kunena Forum