PHP Web Host - Quality Web Hosting For All PHP Applications Sign up for PayPal and start accepting credit card payments instantly
  Login or Register
 • Home • Downloads • Your Account • Forums • 

View next topic
View previous topic


Google
 
Web RavenPHPScripts (This Site)
Post new topic   Reply to topic
Author Message
prekill
Worker
Worker


Joined: Oct 22, 2005
Posts: 103

PostPosted: Fri Feb 01, 2008 3:36 am Reply with quote Back to top

Hey,

The new news page number here:
Only registered users can see links on this board!
Get registered or login to the forums!


Is just looking great!!. I was wondering on how to implement this in my phpnuke too. Anyone can give a download link, guide or explanation on how to display it like that?

Thank you!
View user's profile Send private message
Raven
Site Admin/Owner


Joined: Aug 27, 2002
Posts: 15058
Location: Kansas

PostPosted: Sun Feb 03, 2008 1:52 am Reply with quote Back to top

Not that it would be difficult to do, but have you tried contacting them directly?


Last edited by Raven on Sun Feb 03, 2008 6:01 pm; edited 1 time in total
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger
kguske
Site Admin


Joined: Jun 04, 2004
Posts: 4686

PostPosted: Sun Feb 03, 2008 5:33 pm Reply with quote Back to top

You might not even need to ask...
Only registered users can see links on this board!
Get registered or login to the forums!
View user's profile Send private message
prekill
Worker
Worker


Joined: Oct 22, 2005
Posts: 103

PostPosted: Mon Feb 04, 2008 9:38 am Reply with quote Back to top

kguske, This is the old version... like we have here.

I asked and they posted it up for me:
Only registered users can see links on this board!
Get registered or login to the forums!


I am just going to try it right now.

I recommend you will do the same... it is much better looking.

Edit: all I am getting is: "Nothing here check back later...". It just seem too hard for be to figer it out. so i asked there if they can provide deeper explanating? (may be show how to do it in news).
View user's profile Send private message
montego
Site Admin


Joined: Aug 29, 2004
Posts: 7339
Location: Arizona

PostPosted: Tue Feb 05, 2008 5:43 am Reply with quote Back to top

prekill, I have already created pagination for the news module within the upcoming RN release. However, I will admit, it was intended to be very basic. I'll have to cook up one that is more CSS driven so that you can style it to your heart's content.
View user's profile Send private message Visit poster's website
prekill
Worker
Worker


Joined: Oct 22, 2005
Posts: 103

PostPosted: Thu Feb 07, 2008 7:01 am Reply with quote Back to top

I will suggest using this pagination. The reason is that its a general script. it will fit any module of phpnuke with pages. I will include this pagination in the next RN release.

watch this:
Only registered users can see links on this board!
Get registered or login to the forums!


just started adding it to my phpnuke modules.

Smile
View user's profile Send private message
montego
Site Admin


Joined: Aug 29, 2004
Posts: 7339
Location: Arizona

PostPosted: Thu Feb 07, 2008 7:03 am Reply with quote Back to top

prekill, what I have already written is also a general set of two classes that can be used anywhere... Wink

But, I just need to make it more "style friendly".
View user's profile Send private message Visit poster's website
prekill
Worker
Worker


Joined: Oct 22, 2005
Posts: 103

PostPosted: Mon Feb 11, 2008 3:07 am Reply with quote Back to top

ohh I see, cool. Good Work!

Anyway I just finished to add this pagination to my news module. it is looking great! I hope to add it to all my phpnuke modules. the problem is I do not really know how. think you can help me with it maybe? I think Telli is just too busy.

This is the news module with the pagination as Telli posted:

Code:
<?php

/************************************************************************/
/* PHP-NUKE: Web Portal System                                          */
/* ===========================                                          */
/*                                                                      */
/* Copyright (c) 2002 by Francisco Burzi                                */
/* http://phpnuke.org                                                   */
/*                                                                      */
/* This program is free software. You can redistribute it and/or modify */
/* it under the terms of the GNU General Public License as published by */
/* the Free Software Foundation; either version 2 of the License.       */
/************************************************************************/
/*         Additional security & Abstraction layer conversion           */
/*                           2003 chatserv                              */
/*      http://www.nukefixes.com -- http://www.nukeresources.com        */
/************************************************************************/

if (!stristr($_SERVER['SCRIPT_NAME'], "modules.php")) {
    die ("You can't access this file directly...");
}

$index = 1;
require_once("mainfile.php");
$module_name = basename(dirname(__FILE__));
get_lang($module_name);

#Test New Page Numbers - http://www.codezwiz.com/kbview-55-ipb-like-page-numbers-function.html
include('includes/pagination.php');
#END New Page Numbers

function theindex($new_topic=0) {
    global $pagenum, $db, $storyhome, $topicname, $topicimage, $topictext, $datetime, $user, $cookie, $nukeurl, $prefix, $multilingual, $currentlang, $articlecomm, $sitename, $user_news;
    if ($multilingual == 1) {
   $querylang = "AND (alanguage='$currentlang' OR alanguage='')";
    } else {
   $querylang = "";
    }
    include("header.php");
    automated_news();
    if (isset($new_topic)) {
    $new_topic = intval($new_topic);
    } else {
    $new_topic == 0;
    }
    if (isset($cookie[3]) AND $user_news == 1) {
   $storynum = $cookie[3];
    } else {
   $storynum = $storyhome;
    }
    if ($new_topic == 0) {
   $qdb = "WHERE (ihome='0' OR catid='0')";
   $home_msg = "";
    } else {
   $qdb = "WHERE topic='$new_topic'";
   $result_a = $db->sql_query("SELECT topictext FROM ".$prefix."_topics WHERE topicid='$new_topic'");
   $row_a = $db->sql_fetchrow($result_a);   
   $numrows_a = $db->sql_numrows($result_a);
   $topic_title = stripslashes(check_html($row_a['topictext'], "nohtml"));
   OpenTable();
   if ($numrows_a == 0) {
       echo "<center><font class=\"title\">$sitename</font><br><br>"._NOINFO4TOPIC."<br><br>[ <a href=\"modules.php?name=News\">"._GOTONEWSINDEX."</a> | <a href=\"topics.html\">"._SELECTNEWTOPIC."</a> ]</center>";
   } else {
       echo "<center><font class=\"title\">$sitename: $topic_title</font><br><br>"
      ."<form action=\"modules.php?name=Search\" method=\"post\">"
      ."<input type=\"hidden\" name=\"topic\" value=\"$new_topic\">"
      .""._SEARCHONTOPIC.": <input type=\"name\" name=\"query\" size=\"30\">&nbsp;&nbsp;"
      ."<input type=\"submit\" value=\""._SEARCH."\">"
      ."</form>"
      ."[ <a href=\"index.php\">"._GOTOHOME."</a> | <a href=\"topics.html\">"._SELECTNEWTOPIC."</a> ]</center>";
   }
   CloseTable();
   echo "<br>";
    }
      #Test New Page Numbers - http://www.codezwiz.com/kbview-55-ipb-like-page-numbers-function.html
       $start = (isset($_POST['start']) ? intval($_POST['start']) : (isset($_GET['start']) ? intval($_GET['start']) : 0));
       $perpage = '10';
   list($num_pages) = $db->sql_fetchrow($db->sql_query("SELECT COUNT(*) FROM ".$prefix."_stories $qdb")); //$qdb is an added variable 
       #END New Page Numbers

    $result = $db->sql_query("SELECT sid, catid, aid, title, time, hometext, bodytext, comments, counter, topic, informant, notes, acomm, score, ratings FROM ".$prefix."_stories $qdb $querylang ORDER BY sid DESC LIMIT $start, $perpage"); //Added:LIMIT $start, $perpage
    while ($row = $db->sql_fetchrow($result)) {
   $s_sid = intval($row['sid']);
   $catid = intval($row['catid']);
    $aid = stripslashes($row['aid']);
    $title = stripslashes(check_html($row['title'], "nohtml"));
    $time = $row['time'];
    $hometext = stripslashes($row['hometext']);
    $bodytext = stripslashes($row['bodytext']);
    $comments = stripslashes($row['comments']);
    $counter = intval($row['counter']);
    $topic = intval($row['topic']);
    $informant = stripslashes($row['informant']);
    $notes = stripslashes($row['notes']);
   $acomm = intval($row['acomm']);
   $score = intval($row['score']);
   $ratings = intval($row['ratings']);
   if ($catid > 0) {
       $row2 = $db->sql_fetchrow($db->sql_query("SELECT title FROM ".$prefix."_stories_cat WHERE catid='$catid'"));
       $cattitle = stripslashes(check_html($row2['title'], "nohtml"));
   }
   getTopics($s_sid);
   formatTimestamp($time);
   $subject = stripslashes(check_html($subject, "nohtml"));
   $introcount = strlen($hometext);
   $fullcount = strlen($bodytext);
   $totalcount = $introcount + $fullcount;
   $c_count = $comments;
   $r_options = "";
      if (isset($cookie[4])) { $r_options .= "&amp;mode=$cookie[4]"; }
      if (isset($cookie[5])) { $r_options .= "&amp;order=$cookie[5]"; }
      if (isset($cookie[6])) { $r_options .= "&amp;thold=$cookie[6]"; }
   $story_link = "<a href=\"article.html$s_sid$r_options\">";
   $morelink = "(";
   if ($fullcount > 0 OR $c_count > 0 OR $articlecomm == 0 OR $acomm == 1) {
       $morelink .= "$story_link<b>"._READMORE."</b></a> | ";
   } else {
       $morelink .= "";
   }
   if ($fullcount > 0) { $morelink .= "$totalcount "._BYTESMORE." | "; }
   if ($articlecomm == 1 AND $acomm == 0) {
       if ($c_count == 0) { $morelink .= "$story_link"._COMMENTSQ."</a>"; } elseif ($c_count == 1) { $morelink .= "$story_link$c_count "._COMMENT."</a>"; } elseif ($c_count > 1) { $morelink .= "$story_link$c_count "._COMMENTS."</a>"; }
   }
   $sid = intval($s_sid);
   if ($catid != 0) {
       $row3 = $db->sql_fetchrow($db->sql_query("SELECT title FROM ".$prefix."_stories_cat WHERE catid='$catid'"));
       $title1 = stripslashes(check_html($row3['title'], "nohtml"));
       $title = "<a href=\"modules.php?name=News&file=categories&op=newindex&catid=$catid\"><font class=\"storycat\">$title1</font></a>: $title";
       $morelink .= " | <a href=\"modules.php?name=News&file=categories&op=newindex&catid=$catid\">$title1</a>";
   }
   if ($score != 0) {
       $rated = substr($score / $ratings, 0, 4);
   } else {
       $rated = 0;
   }
   $morelink .= " | "._SCORE." $rated";
   $morelink .= ")";
   $morelink = str_replace(" |  | ", " | ", $morelink);
   themeindex($aid, $informant, $datetime, $title, $counter, $topic, $hometext, $notes, $morelink, $topicname, $topicimage, $topictext);
    }
      #Test New Page Numbers - http://www.codezwiz.com/kbview-55-ipb-like-page-numbers-function.html
   $add_url = ($new_topic > 0) ? '&amp;new_topic=' . $new_topic : ''; //is an added variable
      echo pagination('modules.php?name=' . $module_name . $add_url, $num_pages, $perpage, $start);
       #END New Page Numbers
   include("footer.php");
}

function rate_article($sid, $score) {
    global $prefix, $db, $ratecookie, $sitename, $r_options;
    $score = intval($score);
    $sid = intval($sid);
    if ($score) {
   if ($score > 5) { $score = 5; }
   if ($score < 1) { $score = 1; }
   if ($score != 1 AND $score != 2 AND $score != 3 AND $score != 4 AND $score != 5) {
       Header("Location: index.php");
       die();
   }
   if (isset($ratecookie)) {
       $rcookie = base64_decode($ratecookie);
       $rcookie = addslashes($rcookie);
       $r_cookie = explode(":", $rcookie);
   }
   for ($i=0; $i < sizeof($r_cookie); $i++) {
       if ($r_cookie[$i] == $sid) {
      $a = 1;
       }
   }
   if ($a == 1) {
       Header("Location: modules.php?name=News&op=rate_complete&sid=$sid&rated=1");
   } else {
       $result = $db->sql_query("update ".$prefix."_stories set score=score+$score, ratings=ratings+1 where sid='$sid'");
       $info = base64_encode("$rcookie$sid:");
       setcookie("ratecookie","$info",time()+3600);
       Header("Location: modules.php?name=News&op=rate_complete&sid=$sid$r_options");
   }
    } else {
   include("header.php");
   title("$sitename: "._ARTICLERATING."");
   OpenTable();
   echo "<center>"._DIDNTRATE."<br><br>"
       .""._GOBACK."</center>";
   CloseTable();
   include("footer.php");
    }
}

function rate_complete($sid, $rated=0) {
    global $sitename, $user, $cookie;
    $r_options = "";
    if (is_user($user)) {
   if (isset($cookie[4])) { $r_options .= "&amp;mode=$cookie[4]"; }
   if (isset($cookie[5])) { $r_options .= "&amp;order=$cookie[5]"; }
        if (isset($cookie[6])) { $r_options .= "&amp;thold=$cookie[6]"; }
    }
    include("header.php");
    title("$sitename: "._ARTICLERATING."");
    OpenTable();
    if ($rated == 0) {
   echo "<center>"._THANKSVOTEARTICLE."<br><br>"
       ."[ <a href=\"article.html$sid$r_options\">"._BACKTOARTICLEPAGE."</a> ]</center>";
    } elseif ($rated == 1) {
   echo "<center>"._ALREADYVOTEDARTICLE."<br><br>"
       ."[ <a href=\"article.html$sid$r_options\">"._BACKTOARTICLEPAGE."</a> ]</center>";
    }
    CloseTable();
    include("footer.php");
}

switch ($op) {

    default:
    theindex($new_topic);
    break;

    case "rate_article":
    rate_article($sid, $score);
    break;

    case "rate_complete":
    rate_complete($sid, $rated);
    break;

}

?>



Now the next module I want to try is Forums. but I just have no idea on how to start. any advise maybe?

Thank you!
View user's profile Send private message
montego
Site Admin


Joined: Aug 29, 2004
Posts: 7339
Location: Arizona

PostPosted: Mon Feb 11, 2008 7:18 am Reply with quote Back to top

prekill, forums already has its own paging, so I wouldn't see this being applied there???? In fact, it could be quite a daunting task.
View user's profile Send private message Visit poster's website
prekill
Worker
Worker


Joined: Oct 22, 2005
Posts: 103

PostPosted: Mon Feb 11, 2008 7:48 am Reply with quote Back to top

yes but its ugly... this one is much better. look how it works at codezwiz.com in forums:
Only registered users can see links on this board!
Get registered or login to the forums!


I want to do the same.. any idea how?
View user's profile Send private message
montego
Site Admin


Joined: Aug 29, 2004
Posts: 7339
Location: Arizona

PostPosted: Wed Feb 13, 2008 6:24 am Reply with quote Back to top

Not sure. I am not a phpBB expert. Have you tried looking at the HTML to see if there are class names on these in your forums that maybe you could change the CSS to get closer? Unfortunately, that is the best that I personal can do for you here.
View user's profile Send private message Visit poster's website
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
Forums ©
 

All logos and trademarks in this site are property of their respective owner.
The comments are property of their posters, all the rest © 2002-2008 by Raven
Proud to be listed at Lobo Links Web Directory

You can syndicate our news using the file xml

CSE HTML Validator Helped Clean up This Page! [Valid RSS] valid RSS 2.0 Valid robots.txt Stop Spam Harvesters, Join Project Honey Pot

Website engines core code is © copyright by PHP-Nuke but has been heavily patched and modified by myself and others.
PHP-Nuke is a free software released under the GNU/GPL.


:: fisubice phpbb2 style by Daz :: PHP-Nuke theme by www.nukemods.com ::

:: fisubice Theme Recoded To 100% W3C CSS & HTML 4.01 Transitional Compliance by Raven and 64bitguy ::

:: W3C CSS Compliance Validation :: W3C HTML 4.01 Transitional Compliance Validation ::

zerosum