Seite 7 von 25

Re: Modul: Standard-Artikelliste Advanced v2.2.2

Verfasst: Fr 8. Jan 2010, 12:46
von jdstrike
ja habe schon jede anzahl durchprobiert aber es bewegt sich nichts von der Seite 1 von x weg
es ist doch nicht vorraussetzung alle 5 Felder zu deklarieren, habe jetzt nur drei drin. Aber daran kann es ja wohl nicht liegen.Oder doch?

Habe gerade den AMR draufgeschmissen aber auch mit dem tut sich nichts.
Danke schon mal für deine Hilfe. Noch ne andere Idee woran es liegen könnte. Meine einzige Vermutung ist das er nextstep ignoriert im URL Builder.

Re: Modul: Standard-Artikelliste Advanced v2.2.2

Verfasst: Fr 8. Jan 2010, 12:54
von funomat
Standardmäßig wird nichts ignoriert. Hast Du irgendetwas an dem Modul geändert? Welche Vesionen (Contenido, S-AA) verwendest Du?

Re: Modul: Standard-Artikelliste Advanced v2.2.2

Verfasst: Fr 8. Jan 2010, 13:09
von jdstrike
Article List Advanced V4.6.x-V4.8.x V2.2.2
Contenido V4.8.12

Ich hatte mal BadBehaviour auf contenido laufen, ist aber nicht mehr aktiv.
EDIT:
Ja, BB ist völlig ausgebaut.

Re: Modul: Standard-Artikelliste Advanced v2.2.2

Verfasst: Sa 9. Jan 2010, 12:52
von jdstrike
So ich bin es nochmal...

Problem: nextstep-Variable wird übergeben aber zeigt keinen Effekt.

Auslöser: es sind zwei Artikellisten auf der Seite eingebaut, eine zum blättern eine ohne blätter-funktion. die variable nextstep steht aber in beiden modulen drin.

Lösung: nextstep Variable austauschen z.B durch scrollpage

Output (Article List Advanced V2.2.2):

Code: Alles auswählen

<?php
# Initialization
$bDebug     = false;
$iDataStart = 30;
$lCount     = 0;

unset ($aData);
$aData = array();

# Base settings
unset ($aSettings);
$aSettings = array();
$aSettings["ArticleCount"]       = "CMS_VALUE[0]";
$aSettings["ArticlePerPage"]     = "CMS_VALUE[1]";
$aSettings["SortBy"]             = "CMS_VALUE[2]";
$aSettings["SortDir"]            = "CMS_VALUE[3]";
$aSettings["ShowStart"]          = "CMS_VALUE[4]";
$aSettings["Category"]           = "CMS_VALUE[5]";
$aSettings["HeadlineIdentifier"] = "CMS_VALUE[7]";
$aSettings["HeadlineLength"]     = "CMS_VALUE[8]";
$aSettings["Elements"]           = "CMS_VALUE[9]";
$aSettings["CatTypeSel"]         = "CMS_VALUE[10]";
$aSettings["AddCats"]            = "CMS_VALUE[11]";
$aSettings["DateType"]           = "CMS_VALUE[13]";
$aSettings["Date"]               = "CMS_VALUE[14]";
$aSettings["Template"]           = "CMS_VALUE[15]";
$aSettings["PageBrowsingType01"] = "CMS_VALUE[16]";
$aSettings["PageBrowsingType02"] = "CMS_VALUE[17]";
$aSettings["PageBrowsingType03"] = "CMS_VALUE[18]";
$aSettings["PageBrowsingType04"] = "CMS_VALUE[19]";
$aSettings["PageBrowsingType05"] = "CMS_VALUE[20]";
$aSettings["UseUTF8"]            = "CMS_VALUE[21]";

# Checking base settings
if (!is_numeric($aSettings["ArticleCount"]) || $aSettings["ArticleCount"] < 0)
{
    $aSettings["ArticleCount"] = 5;
}
if (!is_numeric($aSettings["ArticlePerPage"]) || $aSettings["ArticlePerPage"] < 0)
{
    $aSettings["ArticlePerPage"] = 0; // Deactivating page browsing
}
if ($aSettings["ArticlePerPage"] == 0 || !is_numeric($_REQUEST["scrollpage"]))
{
    $_REQUEST["scrollpage"] = 0;
}
if (!is_numeric($aSettings["Category"]) || $aSettings["Category"] <= 0)
{
    $aSettings["Category"] = 0;
}
if (strlen($aSettings["HeadlineIdentifier"]) > 50)
{
    $aSettings["HeadlineIdentifier"] = "";
}
if (!is_numeric($aSettings["HeadlineLength"]) || $aSettings["HeadlineLength"] < 0)
{
    $aSettings["HeadlineLength"] = 0;
}
if (!is_numeric($aSettings["Elements"]) || $aSettings["Elements"] < 0)
{
    $aSettings["Elements"] = 0;
}
if ($aSettings["CatTypeSel"] == "" || ($aSettings["AddCats"] == "" && $aSettings["CatTypeSel"] == "selected"))
{
    $aSettings["CatTypeSel"] = "none";
}

if ($aSettings["UseUTF8"] == "enabled")
{
    # Needed functions for UTF8 and PHP4 - Posted by "laurynas.butkus@gmail.com" at http://us2.php.net/manual/de/function.html-entity-decode.php
    ######
    # In PHP4 html_entity_decode() is not working well with UTF-8  spitting: "Warning: cannot yet handle MBCS in html_entity_decode()!".
    # This is working solution combining several workarounds:
    ######
    function html_entity_decode_utf8($string)
    {
        static $trans_tbl;
       
        // replace numeric entities
        $string = preg_replace('~&#x([0-9a-f]+);~ei', 'code2utf(hexdec("\\1"))', $string);
        $string = preg_replace('~&#([0-9]+);~e', 'code2utf(\\1)', $string);
    
        // replace literal entities
        if (!isset($trans_tbl))
        {
            $trans_tbl = array();
           
            foreach (get_html_translation_table(HTML_ENTITIES) as $val=>$key)
                $trans_tbl[$key] = utf8_encode($val);
        }
       
        return strtr($string, $trans_tbl);
    }
    
    // Returns the utf string corresponding to the unicode value (from php.net, courtesy - romans@void.lv)
    function code2utf($num)
    {
        if ($num < 128) return chr($num);
        if ($num < 2048) return chr(($num >> 6) + 192) . chr(($num & 63) + 128);
        if ($num < 65536) return chr(($num >> 12) + 224) . chr((($num >> 6) & 63) + 128) . chr(($num & 63) + 128);
        if ($num < 2097152) return chr(($num >> 18) + 240) . chr((($num >> 12) & 63) + 128) . chr((($num >> 6) & 63) + 128) . chr(($num & 63) + 128);
        return '';
    }
}

# Detail settings
if ($aSettings["Elements"] > 0)
{
    for ($i = 0; $i < $aSettings["Elements"]; $i++)
    {
        $iElementType       = $iDataStart   + ($i * 10);
        $iElementIdentifier = $iElementType + 1;
        $iElementWidth      = $iElementType + 2;
        $iElementHeight     = $iElementType + 3;
        $iElementUseSummary = $iElementType + 4;
        /*$iElementPadding    = $iElementType + 4;
        $iElementImgAlign   = $iElementType + 5;*/

        $aSettings["k".$i] = array();
        $aSettings["k".$i]["ElementType"]       = "CMS_VALUE[$iElementType]";        // Text, Image, ExtractedImage
        $aSettings["k".$i]["Identifier"]        = "CMS_VALUE[$iElementIdentifier]";
        $aSettings["k".$i]["ElementWidth"]      = "CMS_VALUE[$iElementWidth]";       // Textlength or ImageWidth
        $aSettings["k".$i]["ElementHeight"]     = "CMS_VALUE[$iElementHeight]";
        $aSettings["k".$i]["ForceSummaryUsage"] = "CMS_VALUE[$iElementUseSummary]";
        /*$aSettings["k".$i]["ElementPadding"]    = "CMS_VALUE[$iElementPadding]";
        $aSettings["k".$i]["ElementImgAlign"]   = "CMS_VALUE[$iElementImgAlign]";*/

        # Check detail settings
        if ($aSettings["k".$i]["ElementType"] == "")
        {
            $aSettings["k".$i]["ElementType"] == "Text";
        }
        if ($aSettings["k".$i]["ElementType"] == "Text")
        {
            $aSettings["ElementHeight"] = 0;
            if (!is_numeric($aSettings["k".$i]["ElementWidth"]) || $aSettings["k".$i]["ElementWidth"] < 0)
            {
                $aSettings["k".$i]["ElementWidth"] = 50;
            }
        }
        elseif (!is_numeric($aSettings["k".$i]["ElementWidth"]) || $aSettings["k".$i]["ElementWidth"] <= 0 ||
                !is_numeric($aSettings["k".$i]["ElementHeight"]) || $aSettings["k".$i]["ElementHeight"] <= 0)
        {
            $aSettings["k".$i]["ElementWidth"] = 0;
            $aSettings["k".$i]["ElementHeight"] = 0;
        }
        if (strlen($aSettings["Identifier"]) > 50)
        {
            $aSettings["Identifier"] = "";
        }
    } // end for
}

unset ($iDataStart);
unset ($iElementType);
unset ($iElementIdentifier);
unset ($iElementWidth);
unset ($iElementHeight);
unset ($iElementUseSummary);

if ($aSettings["Category"] !== "0" && $aSettings["HeadlineIdentifier"] !== "")
{
    if (!is_object($db2))
    {
        $db2 = new DB_Contenido;
    }

    # Specifying search categories
    $sSelCats = "'".$aSettings["Category"]."'";
    # Adding categories "below" primary category
    switch ($aSettings["CatTypeSel"])
    {
        case "below":
            $lCatLevel = -1;
            $sql  = "SELECT a.idcat AS idcat, b.level AS level FROM " . $cfg["tab"]["cat"] . " a, " . $cfg["tab"]["cat_tree"] . " b ";
            $sql .= "WHERE a.idcat = b.idcat ORDER BY b.idtree";

            $db2->query($sql);
            while($db2->next_record())
            {
                if ($db2->f("idcat") == $aSettings["Category"])
                {
                    $lCatLevel = $db2->f("level");
                }
                elseif ($lCatLevel > -1 && $db2->f("level") > $lCatLevel)
                {
                    $sSelCats .= ",'" . $db2->f("idcat") . "'";
                }
                elseif ($db2->f("level") <= $lCatLevel)
                {
                    break;
                }
            } // end while
            break;
        case "select":
            $aCats = explode(",", $aSettings["AddCats"]);
            foreach ($aCats as $value)
            {
                if (is_numeric($value))
                {
                    $sSelCats .= ",'".$value."'";
                }
            }
            break;
        default:
    } // end switch

    $sql  = "SELECT tblData.value AS headline, ARTLANG.pagetitle AS pagetitle, ARTLANG.summary AS summary, ARTLANG.idart AS id, ARTLANG.lastmodified AS lastmodified, " ;
    $sql .= "ARTLANG.created AS created, ARTLANG.published AS published, CATLANG.name AS category, ";
    $sql .= "ARTLANG.idartlang AS idartlang, CATART.idcat AS idcat, CATART.idcatart AS idcatart FROM ";
    $sql .= $cfg["tab"]["cat_art"] . " AS CATART, ";
    $sql .= $cfg["tab"]["art_lang"] . " AS ARTLANG, ";
    $sql .= $cfg["tab"]["cat_lang"] . " AS CATLANG, ";
    $sql .= $cfg["tab"]["content"] . " AS tblData ";

    $sql .= "WHERE CATART.idcat IN (" . $sSelCats . ") AND ARTLANG.idlang = '" . $lang . "' ";
    $sql .= "AND tblData.idartlang = ARTLANG.idartlang ";
    $sql .= "AND CATLANG.idlang = ARTLANG.idlang ";
    $sql .= "AND CATLANG.idcat = CATART.idcat ";
    $sql .= "AND ARTLANG.idart = CATART.idart ";

    if ($aSettings["ShowStart"] != "enabled")
    {
        if ($cfg["is_start_compatible"] == true)
        {
            $sql .= "AND CATART.is_start = '0' ";
        }
        else
        {
            $sql .= "AND tblData.idartlang != CATLANG.startidartlang ";
        }
    }

    $sql .= "AND ARTLANG.online = '1' ";
    $sql .= "AND " . $aSettings["HeadlineIdentifier"] . " ";

    // Sort by
    $sql .= "ORDER BY ";
    $sql .= $aSettings["SortBy"] . " " . $aSettings["SortDir"] . " ";

    // LIMIT
    if ($aSettings["ArticleCount"] > 0) {
        $sql .= "LIMIT 0, ".$aSettings["ArticleCount"];
    }

    // execute query
    $db2->query($sql);
    $lCount = $db2->num_rows();

    if ($lCount > 0)
    {
        if (!is_object($db3))
        {
            $db3 = new DB_Contenido;
        }
        if (!is_object($db4))
        {
            $db4 = new DB_Contenido;
        }
        if ($aSettings["ArticlePerPage"] > 0)
        {
            $lStartCount = $_REQUEST["scrollpage"];
            $lEndCount   = $_REQUEST["scrollpage"] + $aSettings["ArticlePerPage"];
            if ($lEndCount > $lCount)
            {
                $lEndCount = $lCount;
            }
        }
        else
        {
            $lStartCount = 0;
            $lEndCount   = $lCount;
        }

        $lRow = 0;
        $i    = 0;
        while ($db2->next_record())
        {
            if ( $aSettings["ShowStart"] == "enabled" ||
                ($aSettings["ShowStart"] != "enabled" && $db2->f("idartlang") != $lStartIDArtLang))
            {
                if ($lRow >= $lStartCount && $lRow < $lEndCount)
                {
                    $aData[$i]                 = array();
                    $aData[$i]["Category"]     = urldecode($db2->f("category"));
                    $aData[$i]["Link"]         = $sess->url("front_content.php?idcat=".$db2->f("idcat")."&idart=".$db2->f("id"));;
                    $aData[$i]["LastModified"] = $db2->f("lastmodified");
                    $aData[$i]["Created"]      = $db2->f("created");
                    $aData[$i]["Published"]    = $db2->f("published");
                    # nachstehende Daten   summary    eingefügt
                    $aData[$i]["Summary"]      = $db2->f("summary");
                    # nachstehende Daten   pagetitle  eingefügt
                    $aData[$i]["Pagetitle"]    = $db2->f("pagetitle");

                    $sTmpValue = html_entity_decode(strip_tags(urldecode($db2->f('headline'))));
                    if ($aSettings["HeadlineLength"] > 0 && strlen($sTmpValue) > $aSettings["HeadlineLength"])
                    {
                        # Cutting text but preserving words and entities
                        $sTmpValue = htmlentities(capiStrTrimAfterWord($sTmpValue, $aSettings["HeadlineLength"])."...");
                    }
                    $aData[$i]["Headline"] = $sTmpValue;

                    if ($aSettings["Elements"] > 0)
                    {
                        for ($k = 0; $k < $aSettings["Elements"]; $k++)
                        {
                            $aData[$i]["i".$k]               = array();
                            $aData[$i]["i".$k]["Value"]      = "";
                            $aData[$i]["i".$k]["ServerPath"] = "";
                            $aData[$i]["i".$k]["WebPath"]    = "";
                            $aData[$i]["i".$k]["Width"]      = 0;
                            $aData[$i]["i".$k]["Height"]     = 0;
                        } // end for

                        $sql =  "SELECT tblData.value AS value, tblData.idtype AS idtype, tblData.typeid AS typeid FROM ";
                        $sql .= $cfg["tab"]["cat_art"] . " AS tblCatArt, ";
                        $sql .= $cfg["tab"]["art_lang"] . " AS tblArtLang, ";
                        $sql .= $cfg["tab"]["content"] . " AS tblData ";
                        $sql .= "WHERE tblData.idartlang = tblArtLang.idartlang AND ";
                        $sql .= "tblArtLang.idlang = '" . $lang . "' AND ";
                        $sql .= "tblArtLang.idart = tblCatArt.idart AND ";
                        $sql .= "tblCatArt.idcatart = '" . $db2->f("idcatart") . "' AND (";
                        
                        $sql_items = "";
                        for ($k = 0; $k < $aSettings["Elements"]; $k++)
                        {
                            if ($aSettings["k".$k]["Identifier"] != "")
                            {
                                if ($sql_items != "")
                                {
                                    $sql_items .= " OR (" . $aSettings["k" . $k]["Identifier"] . ")";
                                }
                                else
                                {
                                    $sql_items = "(" . $aSettings["k" . $k]["Identifier"] . ")";
                                }
                            }
                        } // end for
                        $sql .= $sql_items . ")";

                        if ($bDebug)
                        {
                            echo "<pre>" . $sql . "</pre>", chr(10);
                        }

                        // execute query
                        $db3->query($sql);

                        while ($db3->next_record())
                        {
                            $sTypeIdentifier = "tblData.idtype = '" . $db3->f('idtype') . "' AND tblData.typeid = '" . $db3->f('typeid') . "'";

                            # Note: The TypeIdentifier for one item may be the same as for another item.
                            #       Therefore, we are storing the content everywhere as needed
                            for ($k = 0; $k < $aSettings["Elements"]; $k++)
                            {
                                if ($sTypeIdentifier == $aSettings["k".$k]["Identifier"])
                                {
                                    switch (TRUE)
                                    {
                                        case ($aSettings["k" . $k]["ElementType"] == "Image" || $aSettings["k" . $k]["ElementType"] == "ExtractedImage"):
                                            $sql = "";
                                            if ($aSettings["k".$k]["ElementType"] == "Image")
                                            {
                                                $sql =  "SELECT dirname, filename FROM " . $cfg["tab"]["upl"] . " ";
                                                $sql .= "WHERE idupl = '" . $db3->f('value') . "'";
                                            }
                                            else
                                            {
                                                $sTmpValue = urldecode($db3->f('value'));
   
                                                $regEx = "/<img[^>]*?>.*?/i";
                                                $match = array ();
                                                preg_match($regEx, $sTmpValue, $match);

                                                $regEx = "/(src)(=)(['\"]?)([^\"']*)(['\"]?)/i";
                                                $img = array ();
                                                preg_match($regEx, $match[0], $img);
                                                $img_src = preg_split("/\//", $img[0]);

                                                $img_name = $img_src[count($img_src) - 1];
                                                $img_name = preg_replace("/\"/", "", $img_name);

                                                #Don't know what is happening here, exactly...
                                                # $img_split = preg_split("/\./", $img_name);
                                                # $img_type = $img_split[count($img_split) - 1];
                                                # $img_split2 = preg_split("/_/", $img_split[0]);

                                                $name = strtolower($img_name);

                                                #Don't know what is happening here, exactly...
                                                #if (count($img_split2) > 1) {
                                                #   $img_x = $img_split2[count($img_split2) - 1];
                                                #   $img_y = $img_split2[count($img_split2) - 2];

                                                #   if (is_numeric($img_x) AND is_numeric($img_y)) {
                                                #      $suffix = "_".$img_x."_".$img_y.".".$img_type;
                                                #      $name = preg_replace("/$suffix/", "", $img_name);
                                                #      $name = $name.".[a-zA-Z]{3}";
                                                #   }
                                                #}

                                                if (strlen($name) > 0)
                                                {
                                                    $sql =  "SELECT dirname, filename FROM " . $cfg["tab"]["upl"] . " ";
                                                    $sql .= "WHERE LOWER(filename) = '$name'";
                                                    // $sql .= "WHERE filename REGEXP '$name'"; // Old: for 'banner.jpg' 'merlin_banner.jpg' is also returned
                                                }
                                            }

                                            if ($bDebug)
                                            {
                                                echo "<pre>".$sql."</pre>";
                                            }

                                            // execute query
                                            if ($sql != "")
                                            {
                                                $db4->query($sql);

                                                if ($db4->next_record())
                                                {
                                                    $aData[$i]["i" . $k]["ServerPath"]   = $cfgClient[$client]["upl"]["path"] . $db4->f('dirname') . $db4->f('filename');
                                                    $aData[$i]["i" . $k]["WebPath"]      = $cfgClient[$client]["upl"]["htmlpath"] . $db4->f('dirname') . $db4->f('filename');

                                                    list (
                                                        $width,
                                                        $height,
                                                        $type,
                                                        $attr
                                                    ) = getimagesize($aData[$i]["i" . $k]["ServerPath"]);
                                                    $aData[$i]["i" . $k]["Width"]        = $width;
                                                    $aData[$i]["i" . $k]["Height"]       = $height;
                                                }
                                            }
                                            break;
                                        default:
                                            if ($aSettings["UseUTF8"] != "enabled")
                                            {
                                                $sTmpValue = html_entity_decode(strip_tags(urldecode($db3->f('value'))));
                                            }
                                            else
                                            {

                                                $sTmpValue = html_entity_decode_utf8(strip_tags(urldecode($db3->f('value'))));
                                            }
                                            if ($aSettings["k" . $k]["ElementWidth"] > 0 && strlen($sTmpValue) > $aSettings["k" . $k]["ElementWidth"])
                                            {
                                                # Cutting text but preserving words and entities
                                                $sTmpValue = capiStrTrimAfterWord($sTmpValue, $aSettings["k" . $k]["ElementWidth"]) . "...";
                                            }
                                            $aData[$i]["i".$k]["Value"] = $sTmpValue;
                                    } // end switch
                                }
                            } // end for
                        } // end while
                    }
                    $i++;
                }
                elseif ($lRow == $lEndCount)
                {
                    break;
                }
                $lRow++;
            }
        } // end while

        # Clearing memory
        unset ($db2);
        unset ($db3);
        unset ($db4);
        unset ($sql);
        unset ($lStartIDArtLang);
        unset ($lStartCount);
        unset ($lEndCount);
    
        # Output data
        # Every output manipulation should be done here...
        #
        # Base information:
        # $aSettings["Elements"]:                  Number of expected, additional elements from each article
        # $aSettings["ArticlePerPage"]:            Number of articles per page (0: show all)
        # $aSettings["k".$i]["ElementType"]:       Per Element: Type of Element: Text, Image or ExtractedImage
        # $aSettings["k".$i]["ElementWidth"]:      Per Element: Text length or image width (-> recycling ...)
        # $aSettings["k".$i]["ElementHeight"]:     Per Element: Image width
        # $aSettings["k".$i]["ForceSummaryUsage"]: Per Element: 
        #
        # Per article:
        # $aValue["Headline"]:                     Content of article element specified as containing the headline information
        # $aValue["Link"]:                         Relative link to get to the listed article
        # $aValue["LastModified"]:                 Last modified date of the article
        # $aValue["Created"]:                      Created date of the article
        # $aValue["Published"]:                    Published date of the article
        # $aValue["Category"]:                     Category name
        # $aValue["Summary"]:                      summary Zusammenfassung
        # $aValue["Pagetitle"]:                    Seitentitel pagetitle
        #
        # Per article additional element:
        # $aValue["i".$i]["Value"]:                Text (only for text elements, otherwise "")
        # $aValue["i".$i]["WebPath"]:              HTTP... path to image
        # $aValue["i".$i]["ServerPath"]:           /server/... path to image
        # $aValue["i".$i]["Width"]:                >Original< image width
        # $aValue["i".$i]["Height"]:               >Original< image height
    
        /* Init Template */
    
        if (!is_object($tpl)) {
            $tpl = new Template;
        }
        $tpl->reset();
    
        $tpl->set('s', 'TITLE', $newsheadline);
    
        foreach ($aData as $aValue)
        {
            $artlist_summary = $aValue["Summary"];
            if ($aSettings["Elements"] > 0)
            {
                for ($i = 0; $i < $aSettings["Elements"]; $i++)
                {
                    switch (TRUE)
                    {
                        case ($aSettings["k".$i]["ElementType"] == "Image" || $aSettings["k".$i]["ElementType"] == "ExtractedImage"):
                            $image = $aValue["i".$i]["WebPath"];
        
                            $width  = $aValue["i" . $i]["Width"];
                            $height = $aValue["i" . $i]["Height"];
                            if ($aSettings["k" . $i]["ElementWidth"] > 0 && $aSettings["k" . $i]["ElementHeight"] > 0)
                            {
                                # Check, if resize necessary
                                if ( $aValue["i" . $i]["ServerPath"] != "" && file_exists($aValue["i" . $i]["ServerPath"]) &&
                                    ($aValue["i" . $i]["Width"] > $aSettings["k" . $i]["ElementWidth"] || $aValue["i" . $i]["Height"] > $aSettings["k" . $i]["ElementHeight"]))
                                {
                                    # Scale image
                                    $image = capiImgScale($aValue["i" . $i]["ServerPath"], $aSettings["k" . $i]["ElementWidth"], $aSettings["k" . $i]["ElementHeight"], false, false, 10, false);
        
                                    #Get dimensions of the image
                                    list (
                                        $width,
                                        $height,
                                        $type,
                                        $attr
                                    ) = getimagesize(str_replace($cfgClient[$client]["path"]["htmlpath"], $cfgClient[$client]["path"]["frontend"], $image));
                                }
                                else
                                {
                                    $image  = $aValue["i" . $i]["WebPath"];
                                    $width  = $aValue["i" . $i]["Width"];
                                    $height = $aValue["i" . $i]["Height"];
                                }
                            }
                            
                            if ($image != "")
                            {
                                $artlist_image = '<img class="articlelistImage" src="' . $image . '" width="' . $width . '" height="' . $height . '" alt="' . mi18n("Article Thumb") . '" />'; // align="' . $aSettings["k" . $i]["ElementImgAlign"] . '" style="padding:' . $aSettings["k" . $i]["ElementPadding"] . ';"
                            }
                            else
                            {
                                $artlist_image = "";
                            }
                            $tpl->set('d', 'IMG_'.$i,  $artlist_image);
                            
                            break;
                        default: // Everything else is treated as "Text"
                            if ($artlist_summary != "" && $aSettings["k" . $i]["ForceSummaryUsage"] == "force")
                            {
                                $artlist_text = $artlist_summary;
                                $tpl->set('d', 'TEXT_'.$i,  $artlist_text);
                            }
                            else
                            {
                                $artlist_text = $aValue["i" . $i]["Value"];
                                $tpl->set('d', 'TEXT_'.$i,  $artlist_text);
                            }
                            #echo $artlist_text;
                    } // end switch
                } // end for
            }
            $artlist_more = mi18n("More");
    
            if($aSettings["DateType"] == "create")
            {
                $tmp_artlist_Date = strtotime($aValue["Created"]);
            }
            else
            {
                $tmp_artlist_Date = strtotime($aValue["Published"]);
            }
    
            if($aSettings["Date"] != "-1")
            {
                $artlist_lastmod = date($aSettings["Date"], $tmp_artlist_Date);
                if(strlen($artlist_lastmod) > 12)
                {
                    $artlist_lastmod = $artlist_lastmod . mi18n(" Uhr");
                }
            }
            else
            {
                $artlist_lastmod = "";
            }
            
            $tpl->set('d', 'PAGELINK', $aValue["Link"]);
            $tpl->set('d', 'PAGETITEL', $aValue["Pagetitle"]);
            $tpl->set('d', 'HEADLINE', $aValue["Headline"]);
            $tpl->set('d', 'DATE', $artlist_lastmod);
            $tpl->set('d', 'MORE', $artlist_more);
    
            $tpl->next();
    
        } // end foreach
    }

    # Page browsing
    # Hint: Number of max available records: $lCount
    #       Number of pages: round($lCount / $aSettings["ArticlePerPage"])
    #       First page: scrollpage=0
    #       Last page:  scrollpage=(round($lCount / $aSettings["ArticlePerPage"]) - 1) * $aSettings["ArticlePerPage"];
    #                   (I have to admit that I'm not sure about the last page formula ... ;-) )
    if ($aSettings["ArticlePerPage"] > 0)
    {
        $iPages = intval(ceil($lCount / $aSettings["ArticlePerPage"]));
        
        # Example: Back and Next
        $sPageBrowsingType01 = '';
        if ($aSettings["PageBrowsingType01"] == "enabled")
        {
            if ($_REQUEST["scrollpage"] > 0)
            {
                $sPageBrowsingType01 .= '<div class="articlelistBack">';
                $sPageBrowsingType01 .= '<a href="front_content.php?idcat=' . $idcat . '&idart=' . $idart . '&scrollpage=' . ($_REQUEST["scrollpage"] - $aSettings["ArticlePerPage"]) . '">' . mi18n("Back") . '</a>';
                $sPageBrowsingType01 .= '</div>';
            }
            
            if (($_REQUEST["scrollpage"] + $aSettings["ArticlePerPage"]) < $lCount)
            {
                $sPageBrowsingType01 .= '<div class="articlelistNext">';
                $sPageBrowsingType01 .= '<a href="front_content.php?idcat=' . $idcat . '&idart=' . $idart . '&scrollpage=' . ($_REQUEST["scrollpage"] + $aSettings["ArticlePerPage"]) . '">' . mi18n("Next") . '</a>';
                $sPageBrowsingType01 .= '</div>';
            }
        }

        # Example: 1 2 3 4 5 6 7 ...
        $sPageBrowsingType02 = '';
        if ($aSettings["PageBrowsingType02"] == "enabled")
        {
            for ($i = 1; $i <= $iPages; $i++)
            {
                $lNextStep = ($i - 1) * $aSettings["ArticlePerPage"];
                if ($sPageBrowsingType02 != '')
                {
                    $sPageBrowsingType02 .= '&nbsp;';
                }
                
                if ($_REQUEST["scrollpage"] == $lNextStep)
                {
                    $sPageBrowsingType02 .= $i; # I'm on the current page, no link
                }
                else
                {
                    $sPageBrowsingType02 .= '<a class="articlelistPageNumber" href="front_content.php?idcat=' . $idcat . '&idart=' . $idart . '&scrollpage=' . $lNextStep . '">' . $i . '</a>';
                }
            }
        }

        # Example: Seite 1 von 7
        $sPageBrowsingType03 = '';
        if ($aSettings["PageBrowsingType03"] == "enabled")
        {
            for ($i = 1; $i <= $iPages; $i++)
            {
                $lNextStep = ($i - 1) * $aSettings["ArticlePerPage"];
                if ($sPageBrowsingType03 != '')
                {
                    $sPageBrowsingType03 .= '&nbsp;';
                }
                
                if ($_REQUEST["scrollpage"] == $lNextStep)
                {
                    $sPageBrowsingType03 .= mi18n("Page") . ' ' . $i . ' ' . mi18n("of") . ' ' . $iPages; # I'm on the current page, no link
                }
            }
        }

                # Example: |< 1 ... 3 4 5 ... 8 >|

        $sPageBrowsingType04 = '';


        if ($aSettings["PageBrowsingType04"] == "enabled")
        {
            $sPageBrowsingType04 .= '<a class="articlelistBegin" href="front_content.php?idcat=' . $idcat . '&idart=' . $idart . '&scrollpage=0">' . mi18n("Begin") . ' |<</a>';

            for ($i = 1; $i <= $iPages; $i++) {
                $lNextStep = ($i - 1) * $aSettings["ArticlePerPage"];
                if ($i == 1 || $i == $iPages) {
                    if ($sPageBrowsingType04 != '') {
                        $sPageBrowsingType04 .= '&nbsp;';
                    }

                    
                    if ($_REQUEST["scrollpage"] == $lNextStep)
                    {
                        $sPageBrowsingType04 .= $i;
						# I'm on the current page, no link


                    }
                    else
                    {
                        $sPageBrowsingType04 .= '<a class="articlelistPageNumber" href="front_content.php?idcat=' . $idcat . '&idart=' . $idart . '&scrollpage=' . $lNextStep . '">' . $i . '</a>';
                    }
                }
                elseif ($_REQUEST["scrollpage"] == $lNextStep)
                {
                    $sPageBrowsingType04 .= '&nbsp;' . $i . "\n"; # I'm on the current page, no link
                }
                elseif ($_REQUEST["scrollpage"] == ($lNextStep + $aSettings["ArticlePerPage"]))
                {
                    # Front
                    $sPageBrowsingType04 .= '&nbsp;<a class="articlelistPageNumber" href="front_content.php?idcat=' . $idcat . '&idart=' . $idart . '&scrollpage=' . $lNextStep . '">' . $i . '</a>';
                }
                elseif ($_REQUEST["scrollpage"] == ($lNextStep - $aSettings["ArticlePerPage"]))
                {
                    # Back
                    $sPageBrowsingType04 .= '&nbsp;<a class="articlelistPageNumber" href="front_content.php?idcat=' . $idcat . '&idart=' . $idart . '&scrollpage=' . $lNextStep . '">' . $i . '</a>';
                }
                elseif ($_REQUEST["scrollpage"] == ($lNextStep - (2 * $aSettings["ArticlePerPage"])) ||

                        $_REQUEST["scrollpage"] == ($lNextStep + (2 * $aSettings["ArticlePerPage"])))
                {
                    $sPageBrowsingType04 .= '...';
                }
            }
            $sPageBrowsingType04 .= '&nbsp;<a class="articlelistEnd" href="front_content.php?idcat=' . $idcat . '&idart=' . $idart . '&scrollpage=' . (round($lCount / $aSettings["ArticlePerPage"]) - 1) * $aSettings["ArticlePerPage"] . '">>| ' . mi18n("End") . '</a>';


        }
        
        # Example: << < 1 ... 3 4 5 ... 8 > >>
        // First Page
        $sPageBrowsingType05 = '';
        if ($aSettings["PageBrowsingType05"] == "enabled")
        {
            if (isset($_GET['scrollpage']) && !(($_GET['scrollpage']) == 0))
            {
                $sPageBrowsingType05 .= '<a class="articlelistBegin" href="front_content.php?idcat='.$idcat.'&idart='.$idart.'&scrollpage=0" title="' . mi18n("Begin") . '">&laquo;</a> &nbsp;';
            }
            elseif (isset($_GET['scrollpage']) && (($_GET['scrollpage']) == 0) || !isset($_GET['scrollpage']))
            {
                $sPageBrowsingType05 .= '&laquo; &nbsp;';
            }
            
            // Previous Page
            if (isset($_GET['scrollpage']) && !(($_GET['scrollpage']) == 0))
            {
                $sPageBrowsingType05 .= '<a class="articlelistPrevious" href="front_content.php?idcat=' . $idcat . '&idart=' . $idart . '&scrollpage=' . ($_REQUEST["scrollpage"] - $aSettings["ArticlePerPage"]) . '" title="' . mi18n("Previous") . '">&lsaquo;</a> &nbsp;';
            }
            elseif (isset($_GET['scrollpage']) && (($_GET['scrollpage']) == 0) || !isset($_GET['scrollpage']))
            {
                $sPageBrowsingType05 .= '&lsaquo; &nbsp;';
            }
            
            for ($i = 1; $i <= $iPages; $i++) {
                $lNextStep = ($i - 1) * $aSettings["ArticlePerPage"];
                if ($i == 1 || $i == $iPages) {
                    if ($sPageBrowsingType05 != '') {
                        $sPageBrowsingType05 .= '&nbsp;';
                    }
                    if ($_REQUEST["scrollpage"] == $lNextStep) {
                        $sPageBrowsingType05 .= $i; # I'm on the current page, no link
                    } else {
                        $sPageBrowsingType05 .= '<a class="articlelistPageNumber" href="front_content.php?idcat='.$idcat.'&idart='.$idart.'&scrollpage='.$lNextStep.'">'.$i.'</a>';
                    }
                } else if ($_REQUEST["scrollpage"] == $lNextStep) {
                    $sPageBrowsingType05 .= '&nbsp;'.$i; # I'm on the current page, no link
                } else if ($_REQUEST["scrollpage"] == ($lNextStep + $aSettings["ArticlePerPage"])) {
                    # Forward
                    $sPageBrowsingType05 .= '&nbsp;<a class="articlelistPageNumber" href="front_content.php?idcat='.$idcat.'&idart='.$idart.'&scrollpage='.$lNextStep.'">'.$i.'</a>';
                } else if ($_REQUEST["scrollpage"] == ($lNextStep - $aSettings["ArticlePerPage"])) {
                    # Back
                    $sPageBrowsingType05 .= '&nbsp;<a class="articlelistPageNumber" href="front_content.php?idcat='.$idcat.'&idart='.$idart.'&scrollpage='.$lNextStep.'">'.$i.'</a>';
                } else if ( $_REQUEST["scrollpage"] == ($lNextStep - (2 * $aSettings["ArticlePerPage"])) ||
                            $_REQUEST["scrollpage"] == ($lNextStep + (2 * $aSettings["ArticlePerPage"]))) {
                    $sPageBrowsingType05 .= '...';
                }
            }
        
            // Next Page
            if (isset($_GET['scrollpage']) && !(($_GET['scrollpage']) == ((round($lCount / $aSettings["ArticlePerPage"]) - 1) * $aSettings["ArticlePerPage"])))
            {
                $sPageBrowsingType05 .= '&nbsp; <a class="articlelistNext" href="front_content.php?idcat=' . $idcat . '&idart=' . $idart . '&scrollpage=' . ($_REQUEST["scrollpage"] + $aSettings["ArticlePerPage"]) . '" title="' . mi18n("Next") . '">&rsaquo;</a>';
            }
            elseif (isset($_GET['scrollpage']) && (($_GET['scrollpage']) == ((round($lCount / $aSettings["ArticlePerPage"]) - 1) * $aSettings["ArticlePerPage"])))
            {
                $sPageBrowsingType05 .= '&nbsp; &rsaquo;';
            }
            else
            {
                $sPageBrowsingType05 .= '&nbsp; <a class="articlelistNext" href="front_content.php?idcat=' . $idcat . '&idart=' . $idart . '&scrollpage=' . $aSettings["ArticlePerPage"] . '" title="' . mi18n("Next") . '">&rsaquo;</a>';
            }
            
            // Last Page
            if (isset($_GET['scrollpage']) && !(($_GET['scrollpage']) == ((round($lCount / $aSettings["ArticlePerPage"]) - 1) * $aSettings["ArticlePerPage"])) || !isset($_GET['scrollpage']))
            {
                $sPageBrowsingType05 .= '&nbsp; <a class="articlelistEnd" href="front_content.php?idcat='.$idcat.'&idart='.$idart.'&scrollpage='.(round($lCount / $aSettings["ArticlePerPage"]) - 1) * $aSettings["ArticlePerPage"].'" title="' . mi18n("End") . '">&raquo;</a>';
            }
            elseif (isset($_GET['scrollpage']) && (($_GET['scrollpage']) == ((round($lCount / $aSettings["ArticlePerPage"]) - 1) * $aSettings["ArticlePerPage"])))
            {
                $sPageBrowsingType05 .= '&nbsp; &raquo;';
            }
        }
    }
    $tpl->set('s', 'PAGEBROWSINGTYPE01', $sPageBrowsingType01);
    $tpl->set('s', 'PAGEBROWSINGTYPE02', $sPageBrowsingType02);
    $tpl->set('s', 'PAGEBROWSINGTYPE03', $sPageBrowsingType03);
    $tpl->set('s', 'PAGEBROWSINGTYPE04', $sPageBrowsingType04);
    $tpl->set('s', 'PAGEBROWSINGTYPE05', $sPageBrowsingType05);
    $tpl->generate($aSettings["Template"]);
}
# Clearing memory
unset ($aData);
unset ($aSettings);
unset ($i);
unset ($lCount);
unset ($bDebug);
?>

Re: Modul: Standard-Artikelliste Advanced v2.2.2

Verfasst: So 10. Jan 2010, 14:27
von funomat
Die Info, dass Du das Modul zwei mal einsetzt, wäre ne große Hilfe gewesen um den Fehler zu finden!!

Re: Modul: Standard-Artikelliste Advanced v2.2.2

Verfasst: So 10. Jan 2010, 14:31
von jdstrike
ja, das stimmt wohl ;)
hätte ich daran gleich gedacht, wär es mir wahrscheinlich auch direkt dann aufgefallen.
Sorry für meine Belästigung und danke für deine Hilfe ;)

Bless jds

Re: Modul: Standard-Artikelliste Advanced v2.2.2

Verfasst: So 10. Jan 2010, 14:43
von funomat
Kein Problem. Hauptsache Du denkst in Zukunft daran alles etwas ausführlicher zu erklären und evtl. mit Bildern oder Links zu ergänzen, dann kann man auch schneller/besser helfen.

Gruß,
funomat

Re: Modul: Standard-Artikelliste Advanced v2.2.2

Verfasst: Mo 11. Jan 2010, 22:51
von Mario_m
Bin immer noch an dem Thema mit dem Seitentitel dran. Leider wird der bei mir nicht angzeigt
<div class="articlelistItem">
<small></small><br/>
<small>28.12.09</small>
<p class="articlelistHeadline"><a class="articlelistHeadline" href="front_content.php?idcat=82&idart=63" title=" Ansparrücklage"> Ansparrücklage</a></p>
<p class="articlelistSubheadline">Auflösung einer Ansparrücklage anlässlich einer

Das entsprechende Tag ist leer.

Desweiteren wird die Pagebrowsingfunktion nicht angezeigt. Anzahl Artikel 0, Anzahl pro Seite 3
UTF nicht angehakt

Hier mein Template:

Code: Alles auswählen

<div class="articlelistPagecounter">
{PAGEBROWSINGTYPE03}
</div>
<!-- BEGIN:BLOCK -->
<div class="articlelistItem">
<small>{PAGETITEL}</small><br/>
<small>{DATE}</small>
<p class="articlelistHeadline"><a class="articlelistHeadline" href="{PAGELINK}" title="{HEADLINE}">{HEADLINE}</a></p>
<p class="articlelistSubheadline">{TEXT_0}</p>
<p class="articlelistMore"><a href="{PAGELINK}" title="{MORE}">{MORE}...</a></p>
</div>
<!-- END:BLOCK -->
<div class="articlelistNavigation">
{PAGEBROWSINGTYPE05}
</div>
Kann mir jemand weiterhelfen?

Re: Modul: Standard-Artikelliste Advanced v2.2.2

Verfasst: Di 12. Jan 2010, 08:53
von funomat
Nur zum Verständnis, welchen Seitentitel willst Du den anzeigen?

Kannst Du bitte auch mal ein screen shot von Deinen Einstellungen posten?

Re: Modul: Standard-Artikelliste Advanced v2.2.2

Verfasst: Di 12. Jan 2010, 17:36
von derSteffen
Hallo,

es wurd schon mal angesprochen aber noch keine Lösung gefunden.

Es geht darum das ein verkürzter Text in der Liste ohne <br /> angezeigt wird. Das ist ja auch richtig so, allerdings "klebt " das Wort nach einem <br /> dann immer gleich an dem davorherigen dran. Es wäre also sinnvoll zu sagen, erstetze <br />, <p>, </p>, <li>, </li> in &nbsp;

Bei einer anderen Artikel-List wurde das umgesetzt (http://forum.contenido.org/viewtopic.ph ... hen#p98945) ich habe auch schon versucht das in diese zu integrieren aber leider ohne Erfolg.

Hätte jemand dafür eine Lösung?

Vielen Dank

MfG Steffen

Re: Modul: Standard-Artikelliste Advanced v2.2.2

Verfasst: Di 12. Jan 2010, 20:49
von Mario_m
Hallo,

es geht um die Variable PAGETITEL, die ja meiner Meinung nach den Seitentitel (aus den Eigenschaften des Artikels) enthalten soll und es geht um das Pagebrowsing
Zwischenablage01.gif
Zwischenablage01.gif (21.13 KiB) 7947 mal betrachtet

Re: Modul: Standard-Artikelliste Advanced v2.2.2

Verfasst: Di 12. Jan 2010, 21:16
von iAlex
Nabend zusammen,

ich habe zu dem Weltklasse-Modul :!: mal eine Frage:

Ist es auch möglich, es mehrfach für verschiedene Artikellisten auf einer Webseite einzusetzen?

Danke für eine Info.

LG
Alex

Re: Modul: Standard-Artikelliste Advanced v2.2.2

Verfasst: Di 12. Jan 2010, 21:21
von Oldperl
iAlex hat geschrieben:Ist es auch möglich, es mehrfach für verschiedene Artikellisten auf einer Webseite einzusetzen?
Für verschiedene Seiten einer Webseite definitv ja, mehrmals auf einer Seite nur mit Einschränkungen, da dafür GET-Variable unterschiedlich sein müßten.
Ob weitere Fehler auftreten wäre zu prüfen, wurde aber offensichtlich schon weiter oben im Thread gemacht.
Vielleicht solltest du dort erst mal nachlesen. :roll:

Gruß aus Franken

Ortwin

Re: Modul: Standard-Artikelliste Advanced v2.2.2

Verfasst: Di 12. Jan 2010, 21:24
von iAlex
Oldperl hat geschrieben:
iAlex hat geschrieben:Ist es auch möglich, es mehrfach für verschiedene Artikellisten auf einer Webseite einzusetzen?
Für verschiedene Seiten einer Webseite definitv ja, mehrmals auf einer Seite nur mit Einschränkungen, da dafür GET-Variable unterschiedlich sein müßten.
Ob weitere Fehler auftreten wäre zu prüfen, wurde aber offensichtlich schon weiter oben im Thread gemacht.
Vielleicht solltest du dort erst mal nachlesen. :roll:

Gruß aus Franken

Ortwin
Hey,

hab ich das wirklich überlesen? Konnte dem thread wohl nicht mehr folgen :roll:

Ich will es auf verschiedenen Seiten einer Webseite einbauen.
Wenn ich es konfiguriert habe, zeigt er mir bei der 2. Liste aber alle Einträge der 1. Liste, das hat mich etwas verwirrt :|

LG
Alex

Re: Modul: Standard-Artikelliste Advanced v2.2.2

Verfasst: Di 12. Jan 2010, 21:27
von Oldperl
@Alex
offensichtlich. 8)

Achja, und du musst auch nicht unbedingt Quoten wenn der betreffende Post direkt davor ist, dann sieht man den Bezug schon. :roll:

Gruß aus Franken

Ortwin