Eredmény: 1 - 7 (7) összesen

Téma: Egy kis HTML feladvány

  1. #1
    LeRoy papys logója
    Csatlakozott
    07-05-14
    Hely
    London, United Kingdom, United Kingdom
    Hozzászólás
    1.465
    Thanked 1 Time in 1 Post

    Alapbeállítás Egy kis HTML feladvány

    Szeretnék találni rá valami megoldást. A jelenlegi kinézet egy egy oszlopos kategória felsorolás. Szeretném ha két hasábos lenne, a balba maradna ez és a jobb oldaliba betehetnék pár álló hirdetést. Eddigi próbálkozásaim nem jártak sikerrel mert bárhogy is csináltam mindig ahány kategória sorolódott fel, annyi jobb oldali doboz képződött, tehát az kéne, hogy a jobb oldali egy egy darabból álló tábla maradjon.

    remélem világosan írtam le

    Kód:
    <?php
    
    defined( '_VALID_MOS' ) or die( 'Direct Access to this location is not allowed.' );
    
    /* 
    * Display a category list item (called by categories/list.tpl.php)
    *
    * General variables  :
    *    $this->theme->path (string) : template path
    *     $this->theme->name (string) : template name
    *     $this->theme->conf (object) : template configuartion parameters
    *    $this->theme->icon (string) : template icon path
    *
    * Template variables :
    *    $item->data        (object) : holds the category data
    *  $item->links     (object) : holds the category operations
    *  $item->paths     (object) : holds the category paths      
    */
    
    
    
    if (!$item->data->image OR $item->data->image == "") {
        $myImage = $item->paths->icon;
    } else {
        $myImage = $item->paths->thumb;
    }
    
    ?>
    <tr>
    
        <td valign="top" width="<?php echo $this->theme->conf->doc_image_width;?>" >
            <a href="<?php echo $item->links->view;?>">
                <img src="<?php echo $myImage;?>" alt="<?php echo $item->data->name;?>" align="right" width="<?php echo $this->theme->conf->doc_image_width;?>" height="<?php echo $this->theme->conf->doc_image_width;?>" />
            </a>
        </td>
    
        <td valign="top">
            <table class="contentpaneopen">
                <tr>
                    <td class="contentheading" width="100%">
                        <a class="contentpagetitle" href="<?php echo $item->links->view;?>"><?php echo $item->data->name;?></a>
                    </td>
                </tr>
    
                <?php if ( $this->theme->conf->catitem_files  ) { ?>
                <tr width="100%">
                    <td valign="top" colspan="2" class="small">
                        <?php echo _DML_TPL_FILES . ': ' . $item->data->files;?>
                    </td>
                </tr>
                <?php } ?>
    
                <?php if ( $this->theme->conf->catitem_description  ) { ?>
                <tr>
                    <td valign="top" >
    
                        <?php
                            if($item->data->description != '') {
                                ?><?php echo $item->data->description;?><br /><?php
                            }?>
                    </td>
                </tr>
                <?php } ?>
            </table>
    
            <span class="article_seperator"> </span>
         </td>
     
     </tr>
    köszi

    Bocsi közben rájöttem a megoldásra, amire ide leírtam már megvolt a megoldás, akár törölhető is ez a post


    Utoljára módosítva: papys által : 2009-10-12 17:02

  2. #2
    Bölcs djarni logója
    Csatlakozott
    08-05-08
    Hely
    Székesfehérvár
    Hozzászólás
    5.290
    Begyűjtött 597 köszönetet
    460 hozzászólásával

    Alapbeállítás re: Egy kis HTML feladvány

    Nem kell törölni!

    Inkább írd le a megoldást

    Arni



  3. #3
    Bölcs Nero logója
    Csatlakozott
    08-10-16
    Hely
    határ
    Hozzászólás
    837
    Begyűjtött 33 köszönetet
    24 hozzászólásával

    Alapbeállítás re: Egy kis HTML feladvány

    így ahogy Arni mondja, ha beírod a megoldást és egy admin hozzá igazítja a címet még hasznos lehet majd valakinek.


    aláírás

  4. #4
    LeRoy papys logója
    Csatlakozott
    07-05-14
    Hely
    London, United Kingdom, United Kingdom
    Hozzászólás
    1.465
    Thanked 1 Time in 1 Post

    Alapbeállítás re: Egy kis HTML feladvány

    közben kiderült hogy nem jó, még küzdök vele és ha végképp nem megy beírom ide, hátha valamelyik guru megfejti



  5. #5
    Chrome Ball Netallica logója
    Csatlakozott
    07-10-10
    Hely
    Győr
    Hozzászólás
    1.503
    Begyűjtött 44 köszönetet
    21 hozzászólásával

    Alapbeállítás re: Egy kis HTML feladvány

    Hát a kérdést eléggé megnehezíti, hogy nem html kódot adtál hanem php-ét ami ráadásul ebben a formában meg sem nézhető, még a html kimenet sem. Szerintem ha a böngészőből kimentenél egy html kódot akkor abba könnyebb lenne kitalálni a megoldást mert így a kérdésben sem vagyok biztos.

    Azért ha az a kérdés amit én értettem belőle akkor ezt az egész táblázatot tedd egy div-be, add meg neki, hogy float: left és a hirdetéseknek meg csinálj másikat float: right css-el.



  6. #6
    LeRoy papys logója
    Csatlakozott
    07-05-14
    Hely
    London, United Kingdom, United Kingdom
    Hozzászólás
    1.465
    Thanked 1 Time in 1 Post

    Alapbeállítás re: Egy kis HTML feladvány

    akkor leírom a dolgot:
    van három fájl amiből az egyikbe beinklúdolódik (szép magyar szó) a másik kettő majd még egy harmadik is. Azt elértem, hogy a főoldalon külön oszlopba jelenjen meg a kategória sor és a reklám banner viszont amikor a kategóriára kattintok akkor bejön a benne lévő tartalom és vele együtt a főoldali hirdetés is. Ez azért baj mert egyik az hogy nem fér el egymás mellett a másik hogy a tartalom (három letölthető valami) alatt 3 google hirdetés van viszont a főoldalival már négy ami nem lehet mint tudjuk.

    beteszem ide a három gyári fájlt meg egy képet a leendő kialakításról_
    -----
    ebbe inklúdolódik bele a többi, ebbe tettem a jobb oldalra a bannert, (ebbe nincs benne) ami kattintás után a másikban is megjelenik:
    HTML kód:
    <?php
    /**
     * MjazTools BlogTheme for DOCMan
     * @version      $Id: list.tpl.php 32 2007-11-06 11:40:26Z mjaz $
     * @package      mjaztools_blogtheme
     * @copyright    Copyright (C) 2007 MjazTools. All rights reserved.
     * @license      GNU/GPL
     * @link         http://www.mjaztools.com/ MjazTools Official Site
     */
    defined( '_VALID_MOS' ) or die( 'Direct Access to this location is not allowed.' );
    
    /* 
    * Display the category list (required)
    * 
    * General variables  :
    *    $this->theme->path (string) : template path
    *     $this->theme->name (string) : template name
    *     $this->theme->conf (object) : template configuartion parameters
    *    $this->theme->icon (string) : template icon path
    *
    * Template variables :
    *    $this->items (array)  : holds an array of dcoument items 
    */
    ?>
    
    <table class="blog" cellpadding="0" cellspacing="0"><tr><td valign="top">
        <?php if ($this->theme->conf->title_categories) { ?>
            <div class="contentheading"><?php echo _DML_TPL_CATS;?></div>
        <?php } ?>
        <table class="contentpaneopen"> 
        <?php
            /* 
             * Include the list_item template and pass the item to it 
            */
          
            foreach($this->items as $item) :
                if($this->theme->conf->cat_empty || $item->data->files != 0) :
                    include $this->loadTemplate('categories/list_item.tpl.php');
                endif;
            endforeach;
        ?>
        </table>
    </td></tr></table>
    ----
    HTML kód:
    <?php
    /**
     * MjazTools BlogTheme for DOCMan
     * @version      $Id: category.tpl.php 32 2007-11-06 11:40:26Z mjaz $
     * @package      mjaztools_blogtheme
     * @copyright    Copyright (C) 2007 MjazTools. All rights reserved.
     * @license      GNU/GPL
     * @link         http://www.mjaztools.com/ MjazTools Official Site
     */
    defined( '_VALID_MOS' ) or die( 'Direct Access to this location is not allowed.' );
    
    /*
    * Display category details (required)
    *
    * General variables  :
    *    $this->theme->path (string) : template path
    *     $this->theme->name (string) : template name
    *     $this->theme->conf (object) : template configuartion parameters
    *    $this->theme->icon (string) : template icon path
    *
    * Template variables :
    *    $this->data        (object) : holds the category data
    *  $this->links     (object) : holds the category operations
    *  $this->paths     (object) : holds the category paths
    */
    ?>
    
    <div class="dm_cat">
    
    
    <?php
        if($this->data->title != '') : 
            ?><div class="dm_name"><?php echo $this->data->title;?></div><?php
        endif;
        
        if($this->data->description != '') : 
            ?><div class="dm_description"><?php echo $this->data->description;?></div><?php
        endif;
    
        if($this->data->image) : 
            ?>
             <div class="dm_thumb">
                <a href="<?php echo $this->paths->thumb; ?>" target="_blank">
                    <img src="<?php echo $this->paths->thumb; ?>" alt="" />
                </a>
            </div>
             <?php 
         endif; 
     ?>
        <div class="clr"></div>
    </div>
    ---
    HTML kód:
    <?php
    /**
     * MjazTools BlogTheme for DOCMan
     * @version      $Id: list_item.tpl.php 32 2007-11-06 11:40:26Z mjaz $
     * @package      mjaztools_blogtheme
     * @copyright    Copyright (C) 2007 MjazTools. All rights reserved.
     * @license      GNU/GPL
     * @link         http://www.mjaztools.com/ MjazTools Official Site
     */
    defined( '_VALID_MOS' ) or die( 'Direct Access to this location is not allowed.' );
    
    /* 
    * Display a category list item (called by categories/list.tpl.php)
    *
    * General variables  :
    *    $this->theme->path (string) : template path
    *     $this->theme->name (string) : template name
    *     $this->theme->conf (object) : template configuartion parameters
    *    $this->theme->icon (string) : template icon path
    *
    * Template variables :
    *    $item->data        (object) : holds the category data
    *  $item->links     (object) : holds the category operations
    *  $item->paths     (object) : holds the category paths      
    */
    
    
    
    if (!$item->data->image OR $item->data->image == "") {
        $myImage = $item->paths->icon;
    } else {
        $myImage = $item->paths->thumb;
    }
    
    ?>
    <tr>
    
        <td valign="top" width="<?php echo $this->theme->conf->doc_image_width;?>" >
            <a href="<?php echo $item->links->view;?>">
                <img src="<?php echo $myImage;?>" alt="<?php echo $item->data->name;?>" align="right" width="<?php echo $this->theme->conf->doc_image_width;?>" height="<?php echo $this->theme->conf->doc_image_width;?>" />
            </a>
        </td>
    
        <td valign="top">
            <table class="contentpaneopen">
                <tr>
                    <td class="contentheading" width="100%">
                        <a class="contentpagetitle" href="<?php echo $item->links->view;?>"><?php echo $item->data->name;?></a>
                    </td>
                </tr>
    
                <?php if ( $this->theme->conf->catitem_files  ) { ?>
                <tr width="100%">
                    <td valign="top" colspan="2" class="small">
                        <?php echo _DML_TPL_FILES . ': ' . $item->data->files;?>
                    </td>
                </tr>
                <?php } ?>
    
                <?php if ( $this->theme->conf->catitem_description  ) { ?>
                <tr>
                    <td valign="top" >
    
                        <?php
                            if($item->data->description != '') {
                                ?><?php echo $item->data->description;?><br /><?php
                            }?>
                    </td>
                </tr>
                <?php } ?>
            </table>
    
            <span class="article_seperator"> </span>
         </td>
     
     </tr>
    ez a details amiben benne van a google kód (ez annyiszor jelenik meg ahányat engedélyezek de mint tudjuk a google csak 3.at enged

    HTML kód:
    <?php
    /**
     * MjazTools BlogTheme for DOCMan
     * @version      $Id: page_docdetails.tpl.php 32 2007-11-06 11:40:26Z mjaz $
     * @package      mjaztools_blogtheme
     * @copyright    Copyright (C) 2007 MjazTools. All rights reserved.
     * @license      GNU/GPL
     * @link         http://www.mjaztools.com/ MjazTools Official Site
     */
    defined( '_VALID_MOS' ) or die( 'Direct Access to this location is not allowed.' );
    
    /* Display the document details page(required)
    * 
    * This template is called when u user preform a details operation on a document. 
    * 
    * General variables  :
    *    $this->theme->path (string) : template path
    *    $this->theme->name (string) : template name
    *    $this->theme->conf (object) : template configuartion parameters
    *    $this->theme->icon (string) : template icon path
    *
    * Preformatted html variables :
    *    $this->html->docdetails (string)(fetched from : documents/document.tpl.php)
    */
    ?>
    
    <?php $this->splugin('pagetitle', _DML_TPL_TITLE_DETAILS ) ?>
    
    <?php echo $this->plugin('javascript', $this->theme->path . "js/theme.js") ?>
    <?php echo $this->plugin('stylesheet', $this->theme->path . "css/theme.css") ?>
    <?php $theme = defined('_DM_J15') ? "css/theme15.css" : "css/theme10.css";
          echo $this->plugin('stylesheet', $this->theme->path . $theme) ?>
    
    
    <?php if ($this->theme->conf->title_details) { ?>
        <div class="componentheading"><?php echo _DML_TPL_TITLE_DETAILS;?></div>
    <?php } ?>
    
    <div>google kód</div>
    <?php echo $this->html->docdetails ?>
    
    
    <?php echo $this->html->menu; ?>




  7. #7
    Chrome Ball Netallica logója
    Csatlakozott
    07-10-10
    Hely
    Győr
    Hozzászólás
    1.503
    Begyűjtött 44 köszönetet
    21 hozzászólásával

    Alapbeállítás re: Egy kis HTML feladvány

    Pfff, még szebb lett. Majd egy php-és kolléga aki otthon van a css-ben is talán ki tudja hámozni. Ha css vagy html lett volna akkor tudnék segíteni de így nem, biztos lesz más.



A téma címkéi:

Könyvjelzők

Hozzászólás szabályai

  • Új témákat nem hozhatsz létre
  • Válaszokat nem küldhetsz
  • Fájlokat nem csatolhatsz
  • A hozzászólásaidat nem módosíthatod
  •