Phpnuke: how to join sections and articles?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Wolf

    Phpnuke: how to join sections and articles?

    Hi to all!
    With your past help I make a new block in wich you can see last articles
    I inserted in my phpnuke. You can see it at http://www.italialibri.org,
    under the title.
    But I have a problem: I can see new articles, but only for the sections
    listed in the block. The idea is to change also the sections, joined
    with the new articles inserted in the sections itself.
    So, I have always the same sections in the block! Can anyone help me?

    This is the code I used (I don't report html tag and global vars):

    function listsections() {

    [...]

    $result = sql_query("sele ct secid, secname, image from
    ".$prefix."_sec tions order by secid LIMIT 7", $dbi);

    [...]

    while (list($secid, $secname, $image) = sql_fetch_row($ result, $dbi))
    {
    echo "<a
    href=\"modules. php?name=$modul e_name&op=lista rticles&secid=$ secid\"><img
    src=\"images/sections/$image\" border=\"0\" Alt=\"$secname\ "></a><br>";

    listarticles($s ecid);
    }

    }

    Function listarticles works fine, so I don't think the problem is
    here... When I order sections by secid, how to tell the script that I
    want only updated sections? Hope I explained the problem: my english is
    not very good!
    Thank for your help!


    --
    Posted via Mailgate.ORG Server - http://www.Mailgate.ORG
  • Moreno Tiziani

    #2
    Re: Phpnuke: how to join sections and articles?

    "Wolf" <bi0@libero.i t> wrote in message
    news:bc5ca7fdbc 009e6bd0c06d89a 52a46c7.116072@ mygate.mailgate .org
    [color=blue]
    > But I have a problem: I can see new articles, but only for the sections
    > listed in the block. The idea is to change also the sections, joined
    > with the new articles inserted in the sections itself.[/color]

    Well, I found in NewsmaaX block this code:

    while (list($s_sid, $catid, $aid, $title, $time, $expire, $now,
    $hometext, $bodytext, $comments, $counter, $topic, $informant, $notes,
    $acomm) = mysql_fetch_row ($result)) {
    if ($catid > 0) {
    list($cattitle) = mysql_fetch_row (mysql_query("s elect title
    from $prefix"._stori es."_cat where catid='$catid'" ));
    }

    $sid = $s_sid;
    if ($catid != 0) {
    $resultm = mysql_query("se lect title from
    $prefix"._stori es."_cat where catid='$catid'" );
    list($title1) = mysql_fetch_row ($resultm);
    $title = "$title <a class =\"storycat\"
    href=\"modules. php?name=News&f ile=categories& op=newindex&cat id=$catid\">[
    $title1 ]</a>";
    }

    This result in :

    article title [section name].

    I tried to modify for my problem, bu nothing! :( Any idea?



    --
    Posted via Mailgate.ORG Server - http://www.Mailgate.ORG

    Comment

    • Wolf

      #3
      Re: Phpnuke: how to join sections and articles?

      "Wolf" <bi0@libero.i t> wrote in message
      news:bc5ca7fdbc 009e6bd0c06d89a 52a46c7.116072@ mygate.mailgate .org
      [color=blue]
      > But I have a problem: I can see new articles, but only for the sections
      > listed in the block. The idea is to change also the sections, joined
      > with the new articles inserted in the sections itself.[/color]

      Well, I found in NewsmaaX block this code:

      while (list($s_sid, $catid, $aid, $title, $time, $expire, $now,
      $hometext, $bodytext, $comments, $counter, $topic, $informant, $notes,
      $acomm) = mysql_fetch_row ($result)) {
      if ($catid> 0) {
      list($cattitle) = mysql_fetch_row (mysql_query("s elect title
      from $prefix"._stori es."_cat where catid='$catid'" ));
      }

      $sid = $s_sid;
      if ($catid != 0) {
      $resultm = mysql_query("se lect title from
      $prefix"._stori es."_cat where catid='$catid'" );
      list($title1) = mysql_fetch_row ($resultm);
      $title = "$title <a class =\"storycat\"

      href=\"modules. php?name=News&f ile=categories& op=newindex&cat id=$catid\">[
      $title1 ]</a>";
      }

      This result in :

      article title [section name].

      I tried to modify for my problem, bu nothing! :( Any idea?


      --
      Posted via Mailgate.ORG Server - http://www.Mailgate.ORG

      Comment

      Working...