Google

NukeCoder


View next topic
View previous topic
Post new topic   Reply to topic
Author Message
Promo




Joined: Feb 11, 2009
Posts: 5

PostPosted: Wed Feb 11, 2009 4:39 am
Reply with quote

How can in Sections modules list articles in two rows.
Etc in the link: http://www.promowebservis.com/modules.php?name=Zaporke&op=listarticles&secid=6
This is classic Sections modules.

Thanks
 
View user's profile Send private message Visit poster's website
Guardian




Joined: Dec 09, 2006
Posts: 333

PostPosted: Sun Feb 15, 2009 11:58 am
Reply with quote

The Sections module was removed from phpNuke years ago because it more or less replicated the functionality of the Content module and it was vulnerable.

_________________
Code Authors Nuke Reviews 
View user's profile Send private message
Promo




Joined: Feb 11, 2009
Posts: 5

PostPosted: Sun Feb 15, 2009 12:58 pm
Reply with quote

Sections modules code:

Code:
<?php

if (!eregi("modules.php", $PHP_SELF)) {
    die ("You can't access this file directly...");
}

require_once("mainfile.php");
$module_name = basename(dirname(__FILE__));
get_lang($module_name);
$pagetitle = "- Kategorije članaka";
$index = 0;
function listsections() {
    global $sitename, $prefix, $dbi, $module_name;
    include ('header.php');
    $result = sql_query("select secid, secname, image from ".$prefix."_sections order by secname", $dbi);
    OpenTable();
    echo"<table>"
  . "   <tr>"
  . "      <td>"._SECWELCOME."</td>"
  . "   </tr>"
  . "</table>"
 ."";
    echo "
    <table>"
  . "   <tr>"
  . "      <td>"
  . "      <img></td>"
  . "   </tr>"
  . "</table>
    <table>";
   
   
   
    $count = 0;
    while (list($secid, $secname, $image) = sql_fetch_row($result, $dbi)) {
        if ($count==2) {
        echo "<tr>";
        $count = 0;
        }
        if ($image== "") {echo "<td>  <img> <b><a>$secname</a></b>  ";}
      else { echo "<td><a><img></a>  <a>$secname</a>";};
        $count++;
        if ($count==3) {
        echo "</tr>";
        }
        echo "</td>";
       
    }
        echo "</table><br><Table><tr><td><table>"
  . "   <tr>"
  . "      <td>"
  . "      <img></td>"
  . "   </tr>"
  . "</table>[ <a>promocija putem: PromoWebServis.com</a> ]</td></tr></table></center>";
    CloseTable();
    include ('footer.php');
}

function listarticles($secid) {
    global $prefix, $multilingual, $currentlang, $dbi, $module_name;
    if ($multilingual == 1) {
    $querylang = "AND slanguage='$currentlang'";
    } else {
    $querylang = "";
    }
    include ('header.php');
    $result = sql_query("select secname from ".$prefix."_sections where secid=$secid", $dbi);
    list($secname) = sql_fetch_row($result, $dbi);
   $result = sql_query("select artid, secid, title, content, counter from ".$prefix."_seccont where secid=$secid $querylang ORDER BY artid DESC", $dbi);;
    OpenTable();
    $result2 = sql_query("select image from ".$prefix."_sections where secid=$secid", $dbi);
    list($image) = sql_fetch_row($result2, $dbi);
    echo"<table>"
  . "   <tr>"
  . "      <td>"
  . "      <img></td>"
  . "   </tr>"
  . "</table>"
 ."";
    echo "<left>"; if ($image== "") {echo "  <b>$secname</b>  ";}
      else { echo"<table>"
  . "   <tr>"
  . "      <td>Nalazim se u kategoriji: <a>$secname</a>.</td>"
  . "   </tr>"
  . "</table>"
 ."";};
   echo"<table>"
  . "   <tr>"
  . "      <td>"
  . "      <img></td>"
  . "   </tr>"
  . "</table>"
 ."";
   echo"
    <font>

    <table>";
    while (list($artid, $secid, $title, $content, $counter) = sql_fetch_row($result, $dbi)) {
        echo "
        <tr><td><font>
         - <a>$title</a> ($counter "._READS.")
        <a><img></a>
        </td></tr>
        ";
    }
   
    echo "</table>
    <table>"
  . "   <tr>"
  . "      <td>"
  . "      <img></td>"
  . "   </tr>"
  . "</table>
    <center>
    [ <a>"._SECRETURN."</a> ]</center>";
    CloseTable();
    include ('footer.php');
}

function viewarticle($artid, $page) {
    global $prefix, $dbi, $module_name;
    include("header.php");
    if (($page == 1) OR ($page == "")) {
   sql_query("update ".$prefix."_seccont set counter=counter+1 where artid='$artid'", $dbi);
    }
    $result = sql_query("select artid, secid, title, content, counter from ".$prefix."_seccont where artid=$artid", $dbi);
    list($artid, $secid, $title, $content, $counter) = sql_fetch_row($result, $dbi);

    $result2 = sql_query("select secid, secname from ".$prefix."_sections where secid=$secid", $dbi);
    list($secid, $secname) = sql_fetch_row($result2, $dbi);
    $words = sizeof(explode(" ", $content));
    echo "<center>";
    OpenTable();
    $contentpages = explode( "<pagebreak>", $content );
    $pageno = count($contentpages);
    if ( $page=="" || $page <1> $pageno )
   $page = $pageno;
    $arrayelement = (int)$page;
    $arrayelement --;
    echo"<table>"
  . "   <tr>"
  . "      <td><font>Nalazite u kategoriji: <b>$secname</b>, <font>"._TITLE.": <b>$title</b></font><br>[ "._BACKTO." <a>$secname</a> | "._BACKTO1." <a>"._SECINDEX."</a> ]</td>"
  . "   </tr>"
  . "</table>"
 ."";

    echo"<table>"
  . "   <tr>"
  . "      <td>"
  . "      <img></td>"
  . "   </tr>"
  . "</table>"
 ."";
    echo "<left>$contentpages[$arrayelement]</left><br>";
    if($page >= $pageno) {
     $next_page = "";
    } else {
   $next_pagenumber = $page + 1;
   if ($page != 1) {
       $next_page .= "<img>    ";
   }
   $next_page .= "<a>"._NEXT." ($next_pagenumber/$pageno)</a> <a><img></a>";
    }

    if($page </a>
 
View user's profile Send private message Visit poster's website
Guardian




Joined: Dec 09, 2006
Posts: 333

PostPosted: Sun Feb 15, 2009 3:35 pm
Reply with quote

Sorry but I cannot help you as you have removed the phpNuke copyright notices from the footer.

_________________
Code Authors Nuke Reviews 
View user's profile Send private message
trunks




Joined: Jan 10, 2008
Posts: 57
Location: United Kingdom

PostPosted: Sun Feb 22, 2009 7:07 am
Reply with quote

Hmm yet another....

See below Mr Promo:

http://ravenphpscripts.com/posts17141-highlight-.html

_________________
www.php-clans.com - Web Hosts Specialising in PHPNuke and Gaming Communities. 
View user's profile Send private message Visit poster's website MSN Messenger
Display posts from previous:       
Post new topic   Reply to topic

View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 5 Hours
Forums ©