Zikula: A Flexible Open Source Content Management System
home | forum | contact us

Dizkus

Bottom
Problem with Stories block
  • Posted: 04.12.2002, 14:18
     
    2mas
    rank:
    Freshman Freshman
    registered:
     November 2002
    Status:
    offline
    last visit:
    06.12.02
    Posts:
    3
    Hey, when i make a stories block for my articles in one of my topics, alle articles in all the topics are shown. When i change the settings, nothing happens. Help

    PS. Sorry for by bad english
  • Posted: 04.12.2002, 14:42
     
    larsneo
    rank:
    Software Foundation Software Foundation
    registered:
     December 1969
    Status:
    offline
    last visit:
    15.11.08
    Posts:
    4481
    it's a bug in [722] and we are going to fix it soon. guess it was my fault while adding the security schema - sorry icon_redface

    --
    regards from germany
    ..::[Zikula Application Framework]::.. ..::[SEO-Blog]::.. ..::[CMS Sicherheit]::..
  • Posted: 04.12.2002, 17:09
     
    2mas
    rank:
    Freshman Freshman
    registered:
     November 2002
    Status:
    offline
    last visit:
    06.12.02
    Posts:
    3
    thanks, i will just use, the old stories block until you release the fix.
  • Posted: 04.12.2002, 22:20
     
    larsneo
    rank:
    Software Foundation Software Foundation
    registered:
     December 1969
    Status:
    offline
    last visit:
    15.11.08
    Posts:
    4481
    if you find any spare time please try the updated sources from http://dev.postnuke.com/cgi-bin/viewcvs.cgi/postnuke-devel/html/includes/blocks/stories.php

    TIA!

    --
    regards from germany
    ..::[Zikula Application Framework]::.. ..::[SEO-Blog]::.. ..::[CMS Sicherheit]::..
  • Posted: 04.12.2002, 22:47
     
    2mas
    rank:
    Freshman Freshman
    registered:
     November 2002
    Status:
    offline
    last visit:
    06.12.02
    Posts:
    3
    it works, and it works very well. thanks
  • Posted: 10.12.2002, 00:10
     
    tbell45219
    rank:
    Freshman Freshman
    registered:
     September 2002
    Status:
    offline
    last visit:
    17.06.03
    Posts:
    9
    Mines not working yet. I installed the stories.php file and now I get no blocks for stories. Here is the info I gathered:

    PN 7.2.2
    RedHat Linux 7.2
    PHP 4.2.0
    MySQL 3.xx
    Apache 2.xx
    Per my host.

    Originally I just got the stories which wouldn't filter by topic.
  • Posted: 10.12.2002, 14:14
     
    kzo
    rank:
    Freshman Freshman
    registered:
     December 2002
    Status:
    offline
    last visit:
    19.09.05
    Posts:
    11
    yeah cant get mine to work yet either. PN 7.2.1
    It just doest show up at all when i create the block. I've tried all the versions. Thanks
    kzo
  • Posted: 10.12.2002, 14:37
     
    kzo
    rank:
    Freshman Freshman
    registered:
     December 2002
    Status:
    offline
    last visit:
    19.09.05
    Posts:
    11
    ok i took the version 1.3 of stories.php from PN .7.2.2 and it works, but it doesn't restrict the listed items to the topic i selected. It just lists all the stories I have. like 2mas..
  • Posted: 11.12.2002, 08:45
     
    tbell45219
    rank:
    Freshman Freshman
    registered:
     September 2002
    Status:
    offline
    last visit:
    17.06.03
    Posts:
    9
    Anything on this? Version 1.4 shows no block at all, 1.3 shows the blocks but doesn't show by topics/categories, it just shows everything.
  • Posted: 12.12.2002, 19:31
     
    TomZ
    rank:
    Freshman Freshman
    registered:
     December 2002
    Status:
    offline
    last visit:
    18.12.02
    Posts:
    9
    I have just finish my ugrade from the 0.722, everything is ok, but I don't the old stories block. If I replace this block ( 1.4 ) by the old release 1.3 I don't see anything also. Is there a known bug ?
  • Posted: 13.12.2002, 23:22
     
    kaethe
    rank:
    Freshman Freshman
    registered:
     December 2002
    Status:
    offline
    last visit:
    13.12.02
    Posts:
    3
    So I can across this same problem. Here is the fix.

    Edit includes/blocks/stories.php and look for the function blocks_stories_block().

    Code

    // Base query
        $storiescolumn = &$pntable['stories_column'];
        $storiescatcolumn = &$pntable['stories_cat_column'];
        $query = "SELECT $storiescolumn[sid],
                         $storiescolumn[title],
                         $storiescatcolumn[title],
                         $storiescolumn[time],
                         $storiescolumn[aid]
                  FROM   $pntable[stories], $pntable[stories_cat]
                  WHERE $storiescolumn[catid] = "
    .pnVarPrepForStore($storiescatcolumn['catid'])."";


    So the parts that are changed are the line beginning with FROM and the line Beginning with WHERE. Originally, the FROM line did not include the stories_cat table, but it is necessary before you use stories_cat in the select statement. This is what was causing the block to not show up. the WHERE line used to be a LEFT JOIN which did not work correctly. Having the WHERE clause rather than a LEFT JOIN fixes the issue (that was in the most recent revision of the file apparently.)

    Anyway, that's the fix and it works great. See it in action on the right block on http://emorific.com
  • Posted: 03.01.2003, 14:23
     
    Sandbakk
    rank:
    Freshman Freshman
    registered:
     December 1969
    Status:
    offline
    last visit:
    10.02.03
    Posts:
    14
    :?: If I try v 1.4, the block does'nt show, if I try v.1.3, the block show all the titles, if I try v. 1.4 with the

    // Base query
    $storiescolumn = &$pntable['stories_column'];
    $storiescatcolumn = &$pntable['stories_cat_column'];
    $query = "SELECT $storiescolumn[sid],
    $storiescolumn[title],
    $storiescatcolumn[title],
    $storiescolumn[time],
    $storiescolumn[aid]
    FROM $pntable[stories]
    LEFT JOIN $pntable[stories_cat] ON $storiescolumn[catid] = $storiescatcolumn[catid]";

    from v. 1.3 the block show all the titles. Please, can someone try to fix this block!!
  • Posted: 17.03.2003, 07:40
     
    nwsnow
    rank:
    Freshman Freshman
    registered:
     March 2003
    Status:
    offline
    last visit:
    18.06.03
    Posts:
    7
    kaethe,

    Thank you for pointing out that bit of code. I had looked at that file once or twice, but gotten confused and resolved to start searching on the board here for a patch. All I really wanted my stories block to do is display all categories, so as a very dirty hack I just removed the WHERE statement, it works great!
    :D
    I've got an unhacked version should I ever want to only display one Category in the future.

    Thanks again!

    Luke
  • Posted: 21.03.2003, 22:43
     
    mahmood
    rank:
    Freshman Freshman
    registered:
     December 1969
    Status:
    offline
    last visit:
    24.08.03
    Posts:
    6
    I have a peculuar problem with this block as well: when I select to show only "front page" stories, the block dissapears!

    I tried to locate the stories.php in the cvs in the hope of getting a later version that the 1.4 I'm using now, but couldn't locate the "include/blocks" directory.

    HELP!

    mahmood
    http://www.alyousif.tv

    --
    Bahraini.TV
    Manama, BAHRAIN
  • Posted: 17.04.2003, 02:07
     
    garryp
    rank:
    Freshman Freshman
    registered:
     February 2003
    Status:
    offline
    last visit:
    16.04.03
    Posts:
    11
    My code looks exactly the way you indicate that it should, but I still cannot get the past articles block to display at all.

    I was expecting it to display titles not shown on home page - is this correct?

Extensions Moderation

Main Menu

Extensions Database

Documentation

Development

Login

Donate to Zikula