concatenating two description parts (1 Viewer)

wolfi_b

MP Donator
  • Premium Supporter
  • April 10, 2008
    799
    38
    Home Country
    Austria Austria
    MediaPortal Version: MP1.1.0 RC2
    MediaPortal Skin: Maya
    Windows Version: Windows 7 x86 Ultimate
    CPU Type: AMD Athlon II X2 235e
    HDD: Samsung EcoGreen HD103UI 1TB
    Memory: 4GB DDR3-1333
    Motherboard: Gigabyte GA-MA785GMT-UD2H
    Video Card: onboard Radeon HD4200
    Video Card Driver: Catalyst 10.3
    Sound Card: onboard RTL889A
    Sound Card AC3:
    Sound Card Driver: Win7
    1. TV Card: Digital Everywhere FloppyDTV S2
    1. TV Card Type: DVB-S2
    1. TV Card Driver: 5.7
    2. TV Card: Digital Everywhere FloppyDTV S2
    2. TV Card Type: DVB-S2
    2. TV Card Driver: 5.7
    MPEG2 Video Codec: SAF 4.00
    MPEG2 Audio Codec: SAF 4.00
    h.264 Video Codec: SAF 4.00
    Satelite/CableTV Provider: Astra 19.2°E
    HTPC Case: Lian-Li PC-C36
    Cooling: Scythe Shuriken
    Power Supply: Fortron FSP250-60GHT
    Remote: Logitech Harmony one; Logitech DiNovo Edge; OrigeanAE IR221
    TV: Toshiba 37Z3030D
    TV - HTPC Connection: HDMI

    Hi,

    i want to extend my the grabber for this site:
    http://www.servustv.com/cs/Satellite?defaultDate=2010-04-21&pagename=ServusTV/Ajax/EPGResponse
    in particular i want to grab the description from the sublink:
    ServusTV - The Fantastic Plastic Brain

    Unfortunately the description is divided into two parts, one above and one below the picture. Is it possible to concatenate them?

    best regards, Wolfgang
     

    arion_p

    Retired Team Member
  • Premium Supporter
  • February 7, 2007
    3,373
    1,626
    Athens
    Home Country
    Greece Greece
    If your template contains two <#DESCRIPTION> tags, they will be concatenated. For example:
    Code:
    <div class="articleBodyText"><#DESCRIPTION></div>
    <div></div>
    <div class="articleBodyText"><#DESCRIPTION></div>
    will do what you want if there is always a part before and a part after the picture. Otherwise you have to use Z tags to make the second part optional.
     

    wolfi_b

    MP Donator
  • Premium Supporter
  • April 10, 2008
    799
    38
    Home Country
    Austria Austria
    AW: concatenating two description parts

    Hi, works great:D

    But in some cases i have problems.

    Example:
    Code:
    http://www.servustv.com/cs/Satellite/Article/gut-leben--011259273588216

    my template:
    Code:
                <div>
                <#DESCRIPTION>
                </div>
                <z(>
                <div>
                <div>
                <div>
                <div>
                </div>
                </div>
                </div>
                <z(>
                <div>
                <div>
                </div>
                </div>
                </z)?>
                </div>
                </z)?> 
                <div>
                <#DESCRIPTION>
                </div>

    tags:
    Code:
    D

    only the div sections:
    Code:
    <div>
    Beginnen Sie den Feierabend mit Stefanie Hofbauer und einem kurzweiligen Panorama, das Wissenswertes f&uuml;r jedermann bietet.
    </div>
    <div>
    <div>
    <div>
    <div>
    </div>
    </div>
    </div>
    </div> 
    <div>
    <p>Von Montag bis Freitag gibt Ihnen <strong>gut leben!</strong> t&auml;glich ab 18.30 Uhr wertvolle Tipps und Informationen zu allen Bereichen des Lebens: Service f&uuml;r Zuschauerinnen und Zuschauer steht klar im Mittelpunkt, wenn Gesundheit, Sport, Kultur, Wetter oder Freizeit thematisiert werden.<br />
    <br />
    Das 45-min&uuml;tige Magazin greift sowohl tagesaktuelle als auch zeitlose Schwerpunkte auf und l&auml;dt zum Mitmachen ein. Starten Sie auf <strong>ServusTV</strong> mit gut leben! in Ihren Feierabend, und Sie erhalten auf unterhaltsame Weise Tipps und aktuelle Infos f&uuml;r jeden Tag!<br />
    <br />
    <br />
    <strong>Themen der aktuellen Sendung:</strong><br />
    <br />
    <strong>Tages-Thema:</strong><br />
    Bei dem einen verursachen Erdn&uuml;sse Atemnot, beim anderen rufen Erdbeeren Hautreizungen hervor: Immer mehr Menschen leiden unter Lebensmittel-Allergien. Wodurch werden sie genau verursacht, wie gehen Betroffene am besten damit um - und was kann konkret dagegen unternommen werden? Rund um dieses Thema ist <strong>Dr. Thomas Hawranek</strong> vom Allergie-Zentrum Salzburg im Studio.<br />
    <br />
    <strong>Weitere Themen:</strong><br />
    Augsburg war k&uuml;rzlich Schauplatz des Modular-Festivals, eines von jungen Menschen initiierten &bdquo;Kunst-Marathons&ldquo;: Mehr als 70 Veranstaltungen in nur drei Tagen bildeten ein Kontrast-Programm, wie es interessanter nicht sein konnte - von Moderne bis Klassik waren alle Stilrichtungen dabei.<br />
    <br />
    2010 ist erneut ein sog. Birkenpollen-Mastjahr, warnt der Deutsche Allergie- und Asthmabund: Alle zwei Jahre setzen Birken besonders viele Pollen frei, wodurch insbesondere Birken-Allergikern besonders heftige Beschwerden drohen...<br />
    <br />
    F&uuml;r viele ist er der Inbegriff des Zirkus: Der weltweit bekannte Cirque du Soleil, der derzeit mit &bdquo;Varekai&rdquo;, einer seiner erfolgreichsten Shows, in M&uuml;nchen gastiert. gut leben! hat den &bdquo;Cirque&ldquo; besucht und dabei spannende Einblicke in Leben und Arbeit der Artisten gewonnen.<br />
    <br />
    Au&szlig;erdem ist Fitness- und Gesundheits-Expertin <strong>Claudia Petschnig</strong> im Studio zu Gast - und hat allerhand Wissenswertes &uuml;ber oxidativen Stress und freie Radikale parat.<br />
    <br />
    <strong>Moderation:</strong> Stefanie Hofbauer</p>
    </div>

    The problem is that the second description is too complex. For other sublinks with the same structure the template is working.
    What can i do?

    best regards, Wolfgang
     

    arion_p

    Retired Team Member
  • Premium Supporter
  • February 7, 2007
    3,373
    1,626
    Athens
    Home Country
    Greece Greece
    That shouldn't be a problem. BR tags are converted to new-lines so you get pretty much the same formatting. Am I missing something?
     

    wolfi_b

    MP Donator
  • Premium Supporter
  • April 10, 2008
    799
    38
    Home Country
    Austria Austria
    AW: concatenating two description parts

    I have overlooked something:oops::sorry:

    let's start again:

    there are 3 possibilities how the tags look like:
    Code:
    [U][B]1.[/B][/U]
    <div>
    <#DESCRIPTION>
    </div>
    <div>
    <#DESCRIPTION>
    </div>
    
    [U][B]2.[/B][/U]
    <div>
    <#DESCRIPTION>
    </div>
       <div>
       <div>
       <div>
       <div>
       </div>
       </div>
       </div>
       </div>
    <div>
    <#DESCRIPTION>
    </div>
    
    [U][B]3.[/B][/U]
    <div>
    <#DESCRIPTION>
    </div>
       <div>
       <div>
       <div>
       <div>
       </div>
       </div>
       </div>
          <div>
          <div>
          </div>
          </div>
       </div>
    <div>
    <#DESCRIPTION>
    </div>

    I thought i can combine all three by making the additional tags optional:
    Code:
    <div>
    <#DESCRIPTION>
    </div>
       [COLOR="Orange"]<z(>[/COLOR]
       <div>
       <div>
       <div>
       <div>
       </div>
       </div>
       </div>
          [COLOR="Orange"]<z(>[/COLOR]
          <div>
          <div>
          </div>
          </div>
          [COLOR="Orange"]</z)?>[/COLOR]
       </div>
       [COLOR="Orange"]</z)?> [/COLOR]
    <div>
    <#DESCRIPTION>
    </div>

    but unfortunately the second possibility is not working as intended.
    Is there a way to solve this?

    Thanks for your help,
    Wolfgang
     

    arion_p

    Retired Team Member
  • Premium Supporter
  • February 7, 2007
    3,373
    1,626
    Athens
    Home Country
    Greece Greece
    Unfortunately Z tags cannot be nested. But you can try the following
    Code:
    <div>
    <#DESCRIPTION>
    </div>
       [COLOR=Orange]<z(>[/COLOR]
       <div>
       <div>
       <div>
       <div>
       </div>
       </div>
       </div>
       </div>
       [COLOR=Orange]</z)?> [/COLOR]
       [COLOR=Orange]<z(>[/COLOR]
       <div>
       <div>
       <div>
       <div>
       </div>
       </div>
       </div>
          <div>
          <div>
          </div>
          </div>
       </div>
       [COLOR=Orange]</z)?> [/COLOR]
    <div>
    <#DESCRIPTION>
    </div>

    Ugly, but it should work.
     

    wolfi_b

    MP Donator
  • Premium Supporter
  • April 10, 2008
    799
    38
    Home Country
    Austria Austria
    AW: concatenating two description parts

    Hi arion_p,

    i have tried your version but it does also not work for the above example.

    even more ugly but it seems to work:
    Code:
    <z(>
    <div>
    <#DESCRIPTION>
    </div>
    <div>
    <#DESCRIPTION>
    </div>
    </z)?>
    <z(>
    <div>
    <#DESCRIPTION>
    </div>
    <div>
    <div>
    <div>
    <div>
    </div>
    </div>
    </div>
    </div>
    <div>
    <#DESCRIPTION>
    </div>
    </z)?>
    <z(>
    <div>
    <#DESCRIPTION>
    </div>
    <div>
    <div>
    <div>
    <div>
    </div>
    </div>
    </div>
    <div>
    <div>
    </div>
    </div>
    </div>
    <div>
    <#DESCRIPTION>
    </div>
    </z)?>

    I will give it a longer try.
    :D
     

    wolfi_b

    MP Donator
  • Premium Supporter
  • April 10, 2008
    799
    38
    Home Country
    Austria Austria
    AW: concatenating two description parts

    No, it also doesn't work. Now i have no ideas any more, do you have one?
     

    Attachments

    • 1.GIF
      1.GIF
      111.3 KB
    • 2.GIF
      2.GIF
      121.4 KB

    Users who are viewing this thread

    Top Bottom