Du bist nicht angemeldet. Der Zugriff auf einige Boards wurde daher deaktiviert.

#26 18. April 2011 16:45

Wurst2008
Gast

Re: [GELÖST] php-script einbinden

Du musst die Höhe des iframes angeben:

Ist eigentlich nicht das, was ich will. Der Div sollte sich eigentlich an das Iframe anpassen, da dieses auch ständig andere Höhen hat, je nach angezeigter Tabelle. Lokal klappt das auch mt folgendem Template und CSS:


Template:

{process_pagedata}<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="de" lang="de">
{* Change lang="en" to the language of your site *}

{* note: anything inside these are smarty comments, they will not show up in the page source *}

  <head>
    <title>{sitename} - {title}</title>
{* The sitename is changed in Site Admin/Global settings. {title} is the name of each page *}

 {metadata}
{* Don't remove this! Metadata is entered in Site Admin/Global settings. *}

 {cms_stylesheet}
{* This is how all the stylesheets attached to this template are linked to it *}

 {cms_selflink dir="start" rellink=1}
 {cms_selflink dir="prev" rellink=1}
 {cms_selflink dir="next" rellink=1}
{* Relational links for interconnections between pages, good for accessibility and Search Engine Optimization *}

{* the literal below and the /literal at the end are needed whenever there are {"curly brackets"} as smarty will think it's something to process and will throw an error *}
 {literal}
<script type="text/JavaScript">
<script type="text/javascript" src="js/jquery-1.2.6.js"></script>
<script type="text/javascript" src="js/jquery-1.2.6.pack.js"></script>
<script type="text/javascript" src="js/startstop-slider.js"></script>
<!--
//pass min and max - measured against window width
function P7_MinMaxW(a,b){
var nw="auto",w=document.documentElement.clientWidth;
if(w>=b){nw=b+"px";}if(w<=a){nw=a+"px";}return nw;
}
//-->
</script>
    <!--[if lte IE 6]>
    <style type="text/css">
    #pagewrapper {width:expression(P7_MinMaxW(720,950));}
    #container {height: 1%;}
    </style>
    <![endif]-->
    {/literal}
{* The min and max page width for Internet Explorer is set here. For other browsers it's in the stylesheet "Layout: Top menu + 2 columns" *}

  </head>


  <body>
    <div id="pagewrapper">

{* start accessibility skip links, anything with the class of accessibility is hidden with CSS from visual browsers *}
      <ul class="accessibility">
        <li>{anchor anchor='menu_vert' title='Skip to navigation' accesskey='n' text='Skip to navigation'}</li>
        <li>{anchor anchor='main' title='Skip to content' accesskey='s' text='Skip to content'}</li>
      </ul>
{* end accessibility skip links *}

      <hr class="accessibility" />
{* Horizontal ruler that is hidden for visual browsers by CSS *
}
{* Start Header, with logo image that links to the default start page. Logo image is changed in the stylesheet  "Layout: Top menu + 2 columns" *}
      <div id="header">

{* this holds the name of the site on the right side *}
{*        <h2 class="headright">{sitename}</h2> *}

{* this holds a link back to home page and the header left image/logo, text is hidden using CSS *}
        <h1>{cms_selflink dir="start" text="$sitename"}</h1>
        <hr class="accessibility" />
      </div>
{* End Header *}

{* Start Navigation *}
      <div id="menu_horiz">
{* stylesheet  "Navigation: Simple - Horizontal" *}
        <h2 class="accessibility">Navigation</h2>
        {menu loadprops=0 template='simple_navigation.tpl' number_of_levels='1'}
        <hr class="accessibility" />
      </div>
{* End Navigation *}

{* Start Content (Navigation and Content columns) *}
      <div id="content">



{* Start Content *}

              <div id="main">            
                {content}
                <br />{* to insure space below content *}



                <hr class="accessibility" />
                <div class="clear"></div>

        </div>
{* End Content Area *}
              </div>

{* End Content *}

{* Start Footer. Edit the footer in the Global Content Block called "footer" *}

        <div id="footer">

          {global_content name='footer'}

          </div>

{* End Footer  *}

    </div>
{* end pagewrapper *}

  </body>
</html>

CSS:

/* browsers interpret margin and padding a little differently, we'll remove all default padding and margins and set them later on */
* {
    margin: 0;
    padding: 0;
}
/*Set initial font styles*/
body {
    text-align: left;
    font-family: Verdana, Geneva, Arial, Helvetica, sans-serif;
    font-size: 75.01%;
    line-height: 1em;
}
/*set font size for all divs, this overrides some body rules*/
div {
    font-size: 1em;
}
/*if img is inside "a" it would have borders, we don't want that*/
img {
    border: 0;
}
/*default link styles*/
/* set all links to have underline and bluish color */
a, a:link a:active {
    text-decoration: underline;
/* css validation will give a warning if color is set without background color. this will explicitly tell this element to inherit bg colour from parent element */
    background-color: inherit;
    color: #124F02;
}
a:visited {
    text-decoration: underline;
    background-color: inherit;
    color: #18507C;
/* a different color can be used for visited links */
}
/* remove underline on hover and change color */
a:hover {
    text-decoration: none;
    background-color: inherit;
    color: #124F02;
}
/*****************basic layout *****************/
body {
    margin: 0;
    padding: 0;
/* default text color for entire site*/
    color: #124F02;
/* you can set your own image and background color here */
    background: #EDF2E1;
}
div#pagewrapper {
/* min max width, IE wont understand these, so we will use java script magic in the <head> */
/*    max-width: 99em; */
/*    min-width: 60em; */
        width: 960px;
/* now that width is set this centers wrapper */
    margin: 10px auto 0 auto;
    background-color: #E2F6AF;
    color: #124F02;
}
/* header, we will hide h1 a text and replace it with an image, we assign a height for it so the image wont cut off */
div#header {
/* adjust according your image size */
    height: 112px;
        width: 960px;
 margin: 0;
    /* you can set your own image here, will go behind h1 a image */
    background-color: #268A0C;
/* border just the bottom */

}
div#header h1 a {
/* you can set your own image here */
        background-color: #268A0C;
       background: url([[root_url]]/uploads/atc/head.gif) no-repeat left top;
/* this will make the "a" link a solid shape */
    display: block;
/* adjust according your image size */
    height: 112px;
/* this hides the text */
    text-indent: -999em;
/* old firefox would have shown underline for the link, this explicitly hides it */
    text-decoration: none;
}
div#header h1 {
    padding: ;
/*these keep IE6 from pushing the header to more than the set size*/
    line-height: 0;
    font-size: 0;
/* this will keep IE6 from flickering on hover */
/*    background: url([[root_url]]/uploads/atc/head.gif) no-repeat left top; */
}
/* div#header h2 { */
/* this is where the site name is */
    float: right;
    line-height: 1.2em;
/* this keeps IE6 from not showing the whole text */
    font-size: 1.5em;
/* keeps the size uniform */
/*     margin: 35px 65px 0px 0px; */
/* adjust according your text size */
    color: #f4f4f4;
/* } */
div.crbk {
/* sets all to 0 */
    margin: 0;
    padding: 0;
/* you can set your own image here */
    background: url([[root_url]]/uploads/ngrey/mainrtup.gif) no-repeat right bottom;
}
div#search {
/* position for the search box */
    float: right;
/* enough width for the search input box */
    width: 27em;
    text-align: right;
    padding: 0.5em 0 0.5em 0;
    margin: 0 1em;
}
/* a class for Submit button for the search input box */
input.search-button {
    border: none;
    height: 22px;
    width: 53px;
    margin-left: 5px;
        margin-right: 10px;
    padding: 0px 2px 2px 0px;
/* makes the hover cursor show, you can set your own cursor here */
    cursor: pointer;
/* you can set your own image here */
    background: url([[root_url]]/uploads/atc/search_bg.gif) no-repeat center center;
}
div#content {
/* some air above and under menu and content */
    margin: 1.5em auto 2em 0;
    padding: 15px 5px 5px 5px;

}
/* this gets all the outside calls that were used on the div#main before  */
div.back1 {
/* this will give room for sidebar to be on the left side, make sure this number is bigger than sidebar width */
    margin-left: 240px;
/* and some air on the right */
    margin-right: 10px;
/* you can set your own image here */
    background: ;
}
/* this is an IE6 hack, you may see these through out the CSS */
* html div.back1 {
/* unlike other browser IE6 needs float:right and a width */
    float: right;
    width: 69%;
/* and we take this out or it will stop at the bottom  */
    margin-left: 240px;
/* and some air on the right */
    margin-right: 10px;
/* you can set your own image here */

}

div#main {
/* this is the last inside div so we set the space inside it to keep all content away from the edges of images/box */

/* you can set your own image here */
        padding: 5px 10px 5px 10px;
     background-color: #F8F9D6;

}
div#sidebar {
/* set sidebar left. Change to right, float: right; instead, but you will need to change the margins. */
    float: left;
/* sidebar width, if you change this change div.back and/or div.back1 margins */
    width: 220px;
/* FIX IE double margin bug */
    display: inline;
/* the 20px is on the bottom, insures space above footer if longer than content */
    margin: 0px 0px 20px;
    padding: 0px;
/* you can set your own image here */
    background-color: #F8F9D6;
}
div#sidebarb {
    padding: 10px 15px 10px 20px;
/* this one is for sidebar with content and no menu */
    background-color: #F8F9D6;
}
div#sidebarb div#news {
/* less margin surrounding the news, sidebarb has enough */
      margin: 2em 0 1em 0em;
}
div#sidebara {
    padding: 10px 10px 15px 10px;
/* this one is for sidebar with menu and no content */
    background-color: #F8F9D6;
}

div#footer {
/* this sets 10px on left to balance 10px right on last div */
/*    padding: 0px 0px 0px 10px; */
        width: 100%;
clear: both;
/* color of text, the link color is set below */
    color: #EDEDED;
/* you can set your own image here */
background-color: #268A0C;
}

div#footer p {
/* sets different font size from default */
    font-size: 0.8em;
/* some air for footer */
     padding: 1.1em; 
/* centered text */
    text-align: center;
    margin: 0;
}
div#footer p a {
/* footer link would be same color as default we want it same as footer text */
    color: #EDEDED;
}
/* as we hid all hr for accessibility we create new hr with div class="hr" element */
div.hr {
    height: 1px;
    padding: 1em;
    border-bottom: 1px dotted black;
    margin: 1em;
}

/********************CONTENT STYLING*********************/
/* HEADINGS */
div#content h1 {
/* font size for h1 */
    font-size: 2em;
    line-height: 1em;
    margin: 0;
}
div#content h2 {
    color: #124F02;
/* font size for h2 the higher the h number the smaller the font size, most times */
    font-size: 1.5em;
    text-align: left;
/* some air around the text */
    padding-left: 0.5em;
    padding-bottom: 1px;
/* set borders around header */
    border-bottom: 1px solid #124F02;
    border-left: 1.1em solid #124F02;
/* a larder than h1 line height */
    line-height: 1.5em;
/* and some air under the border */
    margin: 0 0 0.5em 0;
}
div#content h3 {
    color: #124F02;
    font-size: 1.3em;
    line-height: 1.3em;
    margin: 0 0 0.5em 0;
}
div#content h4 {
    color: #124F02;
    font-size: 1.2em;
    line-height: 1.3em;
    margin: 0 0 0.25em 0;
}
div#content h5 {
    color: #124F02;
    font-size: 1.1em;
    line-height: 1.3em;
    margin: 0 0 0.25em 0;
}
h6 {
    color: #124F02;
    font-size: 1em;
    line-height: 1.3em;
    margin: 0 0 0.25em 0;
}
/* END HEADINGS */
/* TEXT */
p {
/* default p font size, this is set different in some other divs */
    font-size: 1em;
/* some air around p elements */
    margin: 0 0 1.5em 0;
    line-height: 1.4em;
    padding: 0;
}
blockquote {
    border-left: 10px solid #ddd;
    margin-left: 10px;
}
strong, b {
/* explicit setting for these */
    font-weight: bold;
}
em, i {
/* explicit setting for these */
    font-style: italic;
}
/* Wrapping text in <code> tags. Makes CSS not validate */
code, pre {
/* css-3 */
    white-space: pre-wrap;
/* Mozilla, since 1999 */
    white-space: -moz-pre-wrap;
/* Opera 4-6 */
    white-space: -pre-wrap;
/* Opera 7 */
    white-space: -o-pre-wrap;
/* Internet Explorer 5.5+ */
    word-wrap: break-word;
    font-family: "Courier New", Courier, monospace;
    font-size: 1em;
}
pre {
/* black border for pre blocks */
    border: 1px solid #000;
/* set different from surroundings to stand out */
    background-color: #ddd;
    margin: 0 1em 1em 1em;
    padding: 0.5em;
    line-height: 1.5em;
    font-size: 90%;
}
/* Separating the divs on the template explanation page */
div.templatecode {
    margin: 0 0 2.5em;
}
/* END TEXT */
/* LISTS */
/* lists in content need some margins to look nice */
div#main ul,
div#main ol,
div#main dl {
    font-size: 1.0em;
    line-height: 1.4em;
    margin: 0 0 1.5em 0;
}
div#main ul li,
div#main ol li {
    margin: 0 0 0.25em 3em;
}
/* definition lists topics on bold */
div#main dl {
    margin-bottom: 2em;
    padding-bottom: 1em;
    border-bottom: 1px solid #c0c0c0;
}
div#main dl dt {
    font-weight: bold;
    margin: 0 0 0 1em;
}
div#main dl dd {
    margin: 0 0 1em 1em;
}
/* END LISTS */

Nochmals danke für Deine Unterstützung!!!

#27 18. April 2011 20:15

nockenfell
Moderator
Ort: Lenzburg, Schweiz
Registriert: 09. November 2010
Beiträge: 2.927
Webseite

Re: [GELÖST] php-script einbinden

Wäre es möglich das ich ein Zugang zu deinem Backen haben könnte?  Die Suche nach dem einen oder anderen wäre so einfacher.

Hier eine Möglichkeit ein iframe dem Inhalt anzupassen:
http://sprachlernspiele.de/scroll/adaptframe.html

(Den Code findest du im Quelltext der Seite)


[dieser Beitrag wurde mit 100% recycled bits geschrieben]
Mein Blog  /   Diverse Links rund um CMS Made Simple
Module: btAdminer, ToolBox

Offline

#28 19. April 2011 22:37

Wurst2008
Gast

Re: [GELÖST] php-script einbinden

{embed header=true} nun doch gefunden (bei der Seite direkt). Brachte auch keine Änderung.
Wobei ja im btembed-Tag steht:

If you want dynamic height you must include in your page {embed url=..} and in the header section (advanced tab) you must put {embed header=true}

PS: Du hast Post

#29 19. April 2011 06:10

nockenfell
Moderator
Ort: Lenzburg, Schweiz
Registriert: 09. November 2010
Beiträge: 2.927
Webseite

Re: [GELÖST] php-script einbinden

Ich habe den Aufruf des JavaScripts in deinen beiden Templates entsprechend meinem Post (http://www.cmsmadesimple.de/forum/viewt … 6495#p6495) korrigiert und aufeinander abgestimmt.

Nun wird die Höhe des iframes zumindest bei der Loginseite der Verwaltung korrekt ausgewiesen. Probiere es mal nach dem Login aus. Möglicherweise war es bereits der JavaScript Fehler.

Übrigens: Innerhalb von {literal} Tags kannst du kein {* .... *} Kommentar/Auskommentieren nutzen.

Die jQuery Version habe ich in beiden Templates auf 1.5.2 geändert.

PS: Du solltest die "min" Version von jQuery nutzen. Diese ist Datenmässig kleiner und damit schneller geladen.


[dieser Beitrag wurde mit 100% recycled bits geschrieben]
Mein Blog  /   Diverse Links rund um CMS Made Simple
Module: btAdminer, ToolBox

Offline

#30 19. April 2011 06:26

Wurst2008
Gast

Re: [GELÖST] php-script einbinden

Hi Nockenfell,

in welchem Template? Also das "ATC" und "atc_db" sehen gleich aus wie gestern. Ich hatte das Template doch schon so geändert wie von Dir beschrieben. Zu dem besteht das Problem immer noch. Das Login-Fenster der Datenbank wird nur korrekt angezeigt, weil die Höhe von 500 Pixel angegeben ist.

Die jQuery Version habe ich in beiden Templates auf 1.5.2 geändert.

Auch das hatte ich doch bereits gemacht?

Beitrag geändert von Wurst2008 (19. April 2011 06:26)

#31 19. April 2011 06:33

nockenfell
Moderator
Ort: Lenzburg, Schweiz
Registriert: 09. November 2010
Beiträge: 2.927
Webseite

Re: [GELÖST] php-script einbinden

Wurst2008 schrieb:

Hi Nockenfell,
in welchem Template? Also das "ATC" und "atc_db" sehen gleich aus wie gestern. Ich hatte das Template doch schon so geändert wie von Dir beschrieben.

Beide. Im atc_db hattest du die Reihenfolge der JavaScripts falsch und im ATC die alte jQuery Version eingebunden.

Zu dem besteht das Problem immer noch. Das Login-Fenster der Datenbank wird nur korrekt angezeigt, weil die Höhe von 500 Pixel angegeben ist.

Hm, soeben nachgeschaut. Der Tag ist ohne Höhenangabe eingebunden. Allerdings habe ich im Moment gerade einen Smarty-Error den ich nicht verifizieren kann. Soweit hatte ich nicht geschaut. Hast du eine Demoseite mit grösserem Inhalt die man einbinden könnte? Im Moment haben wir möglicherweise ein Problem zwischen embed und btembed


[dieser Beitrag wurde mit 100% recycled bits geschrieben]
Mein Blog  /   Diverse Links rund um CMS Made Simple
Module: btAdminer, ToolBox

Offline

#32 19. April 2011 06:35

nockenfell
Moderator
Ort: Lenzburg, Schweiz
Registriert: 09. November 2010
Beiträge: 2.927
Webseite

Re: [GELÖST] php-script einbinden

So jetzt klappts wieder


[dieser Beitrag wurde mit 100% recycled bits geschrieben]
Mein Blog  /   Diverse Links rund um CMS Made Simple
Module: btAdminer, ToolBox

Offline

#33 19. April 2011 06:42

Wurst2008
Gast

Re: [GELÖST] php-script einbinden

Oh ja wir fummeln grad beide gleichzeitig drin rum....ich nehme mal die Hände von den Tasten.

Gib mal beim Datenbank-Login für Gast "besucher" ein. Dann bekommst Du größeren Inhalt.

Nur noch mal zur Info: Auf der lokalen Umgebung funktionieren sowohl btembed als auch embed einwandfrei.

{embed url='http://localhost/atc/verwaltung/'}

So ist der Tag lokal eingebunden. {embed header=true} Ist ebenfalls angegeben. Ansonsten alles gleiche Versionen (php, CMSMS, MySQL...). Einzig Apache hat Unterschiede.

Beitrag geändert von Wurst2008 (19. April 2011 06:50)

#34 19. April 2011 06:46

nockenfell
Moderator
Ort: Lenzburg, Schweiz
Registriert: 09. November 2010
Beiträge: 2.927
Webseite

Re: [GELÖST] php-script einbinden

kannst du den btembed Tag mit folgendem Inhalt ersetzen?

<?php
#CMS - CMS Made Simple
#(c)2004 by Ted Kulp (wishy@users.sf.net)
#This project's homepage is: http://cmsmadesimple.sf.net
#
#This program is free software; you can redistribute it and/or modify
#it under the terms of the GNU General Public License as published by
#the Free Software Foundation; either version 2 of the License, or
#(at your option) any later version.
#
#This program is distributed in the hope that it will be useful,
#but WITHOUT ANY WARRANTY; without even the implied warranty of
#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#GNU General Public License for more details.
#You should have received a copy of the GNU General Public License
#along with this program; if not, write to the Free Software
#Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA

#Author: Sorin Sbarnea / INTERSOL SRL
function smarty_cms_function_btembed($params, &$smarty) {

    $hide_iframe = 'no';
    if(isset($params['hide_iframe']) && ($params['hide_iframe']==true || $params['hide_iframe']=='true'))
        $hide_iframe = 'yes';
        
    $iframe_id = "myframe";
    if(isset($params['iframe_id']) && !empty($params['iframe_id']))
        $iframe_id = trim($params['iframe_id']);
    
    $width='width:99%;';
    $height='';
    if(isset($params['width']) && $params['width']!='') {
        $width = 'width:'.trim($params['width']);
        if (substr($width, -2) != "px" and substr($width, -2) != "%")
            $width.="px";
    }
    
    if(isset($params['height']) && $params['height']!=''){
        $height = 'height:'.trim($params['height']);
        if (substr($height, -2) != "px" and substr($height, -2) != "%")
            $height.="px";
    }
    
    $style='';
    if(isset($params['style']) && $params['style']!='')
        $style = trim($params['style']);
    

    if (!empty($params['url'])) {
        $url = $params['url'];
    } else 
        return "<pre>Invalid call for embed function.<pre>";

    return   "<iframe id='".$iframe_id."' name='".$iframe_id."' src='$url' scrolling='auto' marginwidth='0' marginheight='0' frameborder='0' style='overflow:visible; ".$width."; ".($hide_iframe=="yes"?'display:none;':'').($height!=''?$height.';':'').$style."'></iframe>";

}

function smarty_cms_help_function_btembed() {
    ?>
    <h3>What does this do?</h3>
    <p>Enable inclusion (embeding) of any other application into the CMS. The most usual use could be a forum. 
    This implementation is using IFRAMES so older browsers can have problems. Sorry bu this is the only known way 
    that works without modifing the embeded application.</p>
    <h3>How do I use it?</h3>
    <p>Just insert the tag into your template/page like: <code>{embed}</code><br></p>
        <h3>What parameters does it take?</h3>
        <ul>
            <li><em>(required)</em>url - the url to be included 
            <li><em>(optional)</em>iframe_id - the id of the iframe
            <li><em>(optional)</em>iframe_id_list - a list of the iframe ids used in the template separated by a comma.</li>
            <li><em>(optional)</em>width - width of the iframe.</li>
            <li><em>(optional)</em>height - height of the iframe.</li>
            <li><em>(optional)</em>style - additional stylesheet.</li>
        </ul>
       <p>If you want dynamic height you must include in your page {embed url=..} and in the header section (advanced tab) you must put {embed header=true}</p>
                                                      
    <?php
}

function smarty_cms_about_function_btembed() {
    ?>
    <p>Author: Sorin Sbarnea&lt;sorin2000@intersol.ro&gt; (remove 2000)</p>
    <p>Version: 1.2 (modified by nockenfell)
    <p>Version: 1.1 (modified by NaN)</p>
    <p>
    Change History:<br/>
    <p>Version: 1.1 - added params width, height, additional styles, custom ids</p>
    <p>Version: 1.0 - initial release</p>
    </p>
    <?php
}

?>

[dieser Beitrag wurde mit 100% recycled bits geschrieben]
Mein Blog  /   Diverse Links rund um CMS Made Simple
Module: btAdminer, ToolBox

Offline

#35 19. April 2011 06:53

Wurst2008
Gast

Re: [GELÖST] php-script einbinden

Erledigt. Leider keine Änderung.
Stopp...da haut was noch nicht hin...
..jetzt aber. Immer noch keine Änderung sad

Beitrag geändert von Wurst2008 (19. April 2011 06:57)

#36 19. April 2011 07:16

nockenfell
Moderator
Ort: Lenzburg, Schweiz
Registriert: 09. November 2010
Beiträge: 2.927
Webseite

Re: [GELÖST] php-script einbinden

Arg. Hab was vergessen. Kopiere es nochmals

<?php
#CMS - CMS Made Simple
#(c)2004 by Ted Kulp (wishy@users.sf.net)
#This project's homepage is: http://cmsmadesimple.sf.net
#
#This program is free software; you can redistribute it and/or modify
#it under the terms of the GNU General Public License as published by
#the Free Software Foundation; either version 2 of the License, or
#(at your option) any later version.
#
#This program is distributed in the hope that it will be useful,
#but WITHOUT ANY WARRANTY; without even the implied warranty of
#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#GNU General Public License for more details.
#You should have received a copy of the GNU General Public License
#along with this program; if not, write to the Free Software
#Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA

#Author: Sorin Sbarnea / INTERSOL SRL
function smarty_cms_function_btembed($params, &$smarty) {

    $hide_iframe = 'no';
    if(isset($params['hide_iframe']) && ($params['hide_iframe']==true || $params['hide_iframe']=='true'))
        $hide_iframe = 'yes';
        
    $iframe_id = "myframe";
    if(isset($params['iframe_id']) && !empty($params['iframe_id']))
        $iframe_id = trim($params['iframe_id']);
    
    $width='width:99%;';
    $height='';
    if(isset($params['width']) && $params['width']!='') {
        $width = 'width:'.trim($params['width']);
        if (substr($width, -2) != "px" and substr($width, -2) != "%")
            $width.="px";
    }
    
    if(isset($params['height']) && $params['height']!=''){
        $height = 'height:'.trim($params['height']);
        if (substr($height, -2) != "px" and substr($height, -2) != "%")
            $height.="px";
    }
    
    $style='';
    if(isset($params['style']) && $params['style']!='')
        $style = trim($params['style']);
    

    if (!empty($params['url'])) {
        $url = $params['url'];
    } else 
        return "<pre>Invalid call for embed function.<pre>";

    return   "<iframe id='".$iframe_id."' onLoad='pruefe()'  name='".$iframe_id."' src='$url' scrolling='auto' marginwidth='0' marginheight='0' frameborder='0' style='overflow:visible; ".$width."; ".($hide_iframe=="yes"?'display:none;':'').($height!=''?$height.';':'').$style."'></iframe>";

}

function smarty_cms_help_function_btembed() {
    ?>
    <h3>What does this do?</h3>
    <p>Enable inclusion (embeding) of any other application into the CMS. The most usual use could be a forum. 
    This implementation is using IFRAMES so older browsers can have problems. Sorry bu this is the only known way 
    that works without modifing the embeded application.</p>
    <h3>How do I use it?</h3>
    <p>Just insert the tag into your template/page like: <code>{embed}</code><br></p>
        <h3>What parameters does it take?</h3>
        <ul>
            <li><em>(required)</em>url - the url to be included 
            <li><em>(optional)</em>iframe_id - the id of the iframe
            <li><em>(optional)</em>iframe_id_list - a list of the iframe ids used in the template separated by a comma.</li>
            <li><em>(optional)</em>width - width of the iframe.</li>
            <li><em>(optional)</em>height - height of the iframe.</li>
            <li><em>(optional)</em>style - additional stylesheet.</li>
        </ul>
       <p>If you want dynamic height you must include in your page {embed url=..} and in the header section (advanced tab) you must put {embed header=true}</p>
                                                      
    <?php
}

function smarty_cms_about_function_btembed() {
    ?>
    <p>Author: Sorin Sbarnea&lt;sorin2000@intersol.ro&gt; (remove 2000)</p>
    <p>Version: 1.2 (modified by nockenfell)
    <p>Version: 1.1 (modified by NaN)</p>
    <p>
    Change History:<br/>
    <p>Version: 1.1 - added params width, height, additional styles, custom ids</p>
    <p>Version: 1.0 - initial release</p>
    </p>
    <?php
}

?>

[dieser Beitrag wurde mit 100% recycled bits geschrieben]
Mein Blog  /   Diverse Links rund um CMS Made Simple
Module: btAdminer, ToolBox

Offline

#37 19. April 2011 07:23

Wurst2008
Gast

Re: [GELÖST] php-script einbinden

Erledigt. Immer noch keine Änderung.

#38 19. April 2011 07:37

nockenfell
Moderator
Ort: Lenzburg, Schweiz
Registriert: 09. November 2010
Beiträge: 2.927
Webseite

Re: [GELÖST] php-script einbinden

Ich muss das ganze mal am Abend in Ruhe anschauen. Im Moment habe ich zuwenig Zeit.


[dieser Beitrag wurde mit 100% recycled bits geschrieben]
Mein Blog  /   Diverse Links rund um CMS Made Simple
Module: btAdminer, ToolBox

Offline

#39 19. April 2011 08:03

Wurst2008
Gast

Re: [GELÖST] php-script einbinden

Ja kein Thema. Muss jetzt auch los.
Ich kann mich nur wiederholen: Danke für Dein Bemühen!!!
Ich mach nur eben mal schnell wieder die Höhe fix, da sich heute der Vereinschef die Seite ansehen wird.

Beitrag geändert von Wurst2008 (19. April 2011 08:04)

#40 20. April 2011 16:51

Wurst2008
Gast

Re: [GELÖST] php-script einbinden

Servus Nockenfell. Hattest Du schon eine zündente Idee? Ansonsten werde ich es wohl mit fixer Höhe belassen oder nochmals versuchen, es per Smartytag einzubinden (obwohl ich hier auch nicht weiterkomme).

#41 20. April 2011 19:53

nockenfell
Moderator
Ort: Lenzburg, Schweiz
Registriert: 09. November 2010
Beiträge: 2.927
Webseite

Re: [GELÖST] php-script einbinden

Ehrlich gesagt ist mir gestern Tom Clancy in den Weg gekommen (hab den ganzen Abend gelesen). Und heute hat meine Frau Geburtstag. Ich schau's mir morgen an.


[dieser Beitrag wurde mit 100% recycled bits geschrieben]
Mein Blog  /   Diverse Links rund um CMS Made Simple
Module: btAdminer, ToolBox

Offline

#42 21. April 2011 07:16

Andynium
Moderator
Ort: Dohna / SN / Deutschland
Registriert: 13. September 2010
Beiträge: 7.017
Webseite

Re: [GELÖST] php-script einbinden

Wurst2008 schrieb:

Es wird einfach nichts angezeigt.

Nichts ist ein bißchen wenig - hast du mal die Fehlerausgabe in der config.php aktiviert?

Wurst2008 schrieb:

Lediglich mit {php} ... {/php}-Tags funktioniert es. Dann allerdings werden sämtliche Zeichen wie ä ö ü €... kryptisch dargestellt.

Hängt wahrscheinlich mit der Kodierung zusammen ... CMSMS verwendet utf-8, deine Mitglieder-Anwendung wohl ISO 8859-1 oder ISO 8859-1. Aber wenn dein Programmierer sowieso dran ist, könnte er das ja gleich mit ändern - eine simple Konvertierung sollte nun nicht gerade ein Kostentreiber sein wink.

Offline

#43 22. April 2011 19:19

Wurst2008
Gast

Re: [GELÖST] php-script einbinden

Nichts ist ein bißchen wenig - hast du mal die Fehlerausgabe in der config.php aktiviert?

Ja.
Habe es auch so weit hinbekommen, dass das script startet. Allerdings stellt sich heraus, dass er weitere benötigte php-scripte nicht findet (no such file or directory...). Gleiches Resultat bei UDT und Smarty-Tag. Offenbar funktionieren die in den scripten angegebenen relativen Pfade nicht. Zudem ist hier wieder die Codierung falsch. Ich will diese Pfade in den enzielnen scripts oder die Ordnerstruktur aber auch nicht anpassen, da das Script auch "standalone" laufen und in seinem eigenen Verzeichnis bleiben soll.
Was mir nicht in den Kopf will ist der ansonsten für mich ideale (bt)embed-Tag und warum der bei gleicher php-Version und identischen Templates auf Server A funktioniert und auf Server B nicht (richtig). Wo kann da noch der Unterschied sein? Info.php gibt auch fast identische Werte aus, lediglich kleine Unterschiede bei Apache. Aber kann bei Apache überhaupt die Ursache liegen?

Insgesamt ist es aber nicht so wichtig, dass hier erhöhter Aufwand betrieben werden muss. Mit fixer Höhe lässt es sich gut arbeiten, der Rest ist reiner Optikmangel, mit dem ich aber leben kann und der dem Enduser warscheinlich gar nicht auffällt. Nur mich wurmt es halt. smile

Beitrag geändert von Wurst2008 (22. April 2011 19:21)

#44 22. April 2011 20:53

Andynium
Moderator
Ort: Dohna / SN / Deutschland
Registriert: 13. September 2010
Beiträge: 7.017
Webseite

Re: [GELÖST] php-script einbinden

Wurst2008 schrieb:

Offenbar funktionieren die in den scripten angegebenen relativen Pfade nicht.

Hast du schon mal versucht, absolute Pfade draus zu machen?

http://www.selfphp.de/funktionsreferenz … alpath.php

Offline

#45 22. April 2011 21:07

Wurst2008
Gast

Re: [GELÖST] php-script einbinden

Nein, aber gute Idee. Wäre immer noch das Problem mit der falschen Kodierung. Mal schauen, ob ich da noch was mache. Langsam muss ich auch zum Ende kommen. Ich schieße eh schon mit Kanonen auf Spatzen. Gibt vermutlich nicht mal ein Danke dafür. smile
Bisher ist das Script in einem neuen Fenster geöffnet worden und es kann gut sein, dass das aus Gewohnheit oder Einfachheit (ein Klick auf die entpr. URL statt sich durch das CMS zu wühlen, wenn man schnell mal Mitgliedsdaten einsehen will...) weiterhin passiert und ich mir hier völlig umsonst den Kopf zerbreche.

#46 22. April 2011 21:51

Andynium
Moderator
Ort: Dohna / SN / Deutschland
Registriert: 13. September 2010
Beiträge: 7.017
Webseite

Re: [GELÖST] php-script einbinden

Wurst2008 schrieb:

Nein, aber gute Idee.

Zumindest könntest du dir dann mal die Pfade testhalber ausgeben lassen und würdest wahrscheinlich sehen, wo es klemmt.

Wurst2008 schrieb:

Wäre immer noch das Problem mit der falschen Kodierung.

Damit kannst du jede Ausgabe in utf-8 umwandeln

http://www.php-homepage.de/manual/funct … encode.php

Offline

#47 23. April 2011 07:09

Wurst2008
Gast

Re: [GELÖST] php-script einbinden

Danke!

Damit kannst du jede Ausgabe in utf-8 umwandeln

Hmm, ich sicher nicht. wüsste nicht mal, wo ich das wie einbinden müsste. Und das Wetter ist einfach zu schön, um damit heute die Zeit zu vertrödeln. smile
Evtl. versuche ich das später.

#48 23. April 2011 13:56

nockenfell
Moderator
Ort: Lenzburg, Schweiz
Registriert: 09. November 2010
Beiträge: 2.927
Webseite

Re: [GELÖST] php-script einbinden

Wurst2008 schrieb:

Servus Nockenfell. Hattest Du schon eine zündente Idee? Ansonsten werde ich es wohl mit fixer Höhe belassen oder nochmals versuchen, es per Smartytag einzubinden (obwohl ich hier auch nicht weiterkomme).

Ich hab's nun gelöst. Google sei Dank. Folgendes Script verwende ich nun:
http://sonspring.com/journal/jquery-iframe-sizing

Das JavaScript habe ich im atc_db Template eingebaut. Nun wird die Seite entsprechend angezeigt.

Das iframe habe ich nun direkt als HTML eingefügt und dafür bei der DB Seite den Wysiwyg Editor deaktiviert.


[dieser Beitrag wurde mit 100% recycled bits geschrieben]
Mein Blog  /   Diverse Links rund um CMS Made Simple
Module: btAdminer, ToolBox

Offline

#49 23. April 2011 15:53

Andynium
Moderator
Ort: Dohna / SN / Deutschland
Registriert: 13. September 2010
Beiträge: 7.017
Webseite

Re: [GELÖST] php-script einbinden

Wurst2008 schrieb:

Danke!

Damit kannst du jede Ausgabe in utf-8 umwandeln

Hmm, ich sicher nicht. wüsste nicht mal, wo ich das wie einbinden müsste

Steht ja alles im Link drin  cool .

Evtl. könntest du auch den Befehl als Smarty-Modifikator zur Nachbehandlung der Ausgabe einsetzen

[== Smarty ==]
{capture assign='mitglieder'}{dein_udt}{/capture}
{$mitglieder|utf8_encode}

Müsste man mit dem Script testen  roll ...

Offline

#50 23. April 2011 17:05

nockenfell
Moderator
Ort: Lenzburg, Schweiz
Registriert: 09. November 2010
Beiträge: 2.927
Webseite

Re: [GELÖST] php-script einbinden

cyberman schrieb:

Evtl. könntest du auch den Befehl als Smarty-Modifikator zur Nachbehandlung der Ausgabe einsetzen

[== Smarty ==]
{capture assign='mitglieder'}{dein_udt}{/capture}
{$mitglieder|utf8_encode}

Müsste man mit dem Script testen  roll ...

Mit einem einzelnen Script könnte das funktionieren. Das von Wurst2008 eingesetzte Script besteht aus mehr als einer Datei (vom Aufbau her mit einigen Includes und Unterordnern). Somit wird ein direktes Einbinden per include ein wenig schwieriger.


[dieser Beitrag wurde mit 100% recycled bits geschrieben]
Mein Blog  /   Diverse Links rund um CMS Made Simple
Module: btAdminer, ToolBox

Offline