Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> Modules
Author Message
Donovan
Client



Joined: Oct 07, 2003
Posts: 735
Location: Ohio

PostPosted: Wed Nov 16, 2005 9:22 am Reply with quote

I have had this installed on my 7.3 site for two years. Since I finally upgraded to the 3.1 patch it has broken. How would I make FNA 2.2 compatible with the 3.1 patch?

Mighty_Y has released FNA3.0 which is not backward compatible to earlier Nuke versions before Nuke 7.5

I either need to find a way to fix my version FNA2.2 or install FNA3.0 to a 7.3 site.

As we all know the Nuke admin functions changed with admin/case, admin/links, and admin/module all being contained in public_html/modules. I almost need to reverse engineer to install into a 7.3 site. Anything I need to watch out for?
 
View user's profile Send private message Visit poster's website ICQ Number
technocrat
Life Cycles Becoming CPU Cycles



Joined: Jul 07, 2005
Posts: 511

PostPosted: Wed Nov 16, 2005 11:02 am Reply with quote

You should ask on his site http://support.code-area51.com/index.php?page=scripts

_________________
Only registered users can see links on this board! Get registered or login!
Only registered users can see links on this board! Get registered or login! / Only registered users can see links on this board! Get registered or login! 
View user's profile Send private message
Donovan







PostPosted: Wed Nov 16, 2005 11:16 am Reply with quote

I did. Not as much traffic on that site and it could be days before I get a responce.

I could post the index.php of ForumNews here and have the answer before to long. it is just the level of support here at Ravens is so much better than other places.
 
Donovan







PostPosted: Wed Nov 16, 2005 11:21 am Reply with quote

As a matter of fact here it is.

I made the changes

Code:
if ( !defined('MODULE_FILE') )

{
   die("You can't access this file directly...");
}


and

Code:
define('INDEX_FILE', true);


myself.


Any help is much appreciated.

If I put this to act as my home module I get errors such as:

Quote:
Fatal error: Cannot redeclare stripos_clone() (previously declared in /home/thirdadm/public_html/mainfile.php:147) in /home/thirdadm/public_html/mainfile.php on line 147





Code:
<?php

/********************************************************/
/*                     */
/* News Display module for PHP-Nuke and the phpBB forum */
/* news port                  */
/* Written by ArtificialIntel & Mighty_Y      */
/* Copyright (c) 2003 by ArtificialIntel      */
/* All Rights Reserved               */
/*                     */
/********************************************************/
if ( !defined('MODULE_FILE') )
{
   die("You can't access this file directly...");
}

if(!isset($mainfile)){
   include("mainfile.php");
}

define('INDEX_FILE', true);
$module_name = basename(dirname(__FILE__));
$module_dir = "modules/$module_name/";
get_lang($module_name);
include("header.php");
include($module_dir."bbstuff.php");
include_once($module_dir."fnafunctions.php");
global $db, $prefix, $storyhome, $board_config, $user, $home, $user_news, $cookie, $user_ip, $nukeuser, $user_prefix, $ThemeSel;
$news_id = isset($HTTP_GET_VARS['news_id']) ? intval($HTTP_GET_VARS['news_id']) : 0;
$id = isset($HTTP_GET_VARS['id']) ? intval($HTTP_GET_VARS['id']) : 0;
$page = isset($HTTP_GET_VARS['page']) ? intval($HTTP_GET_VARS['page']) : 0;
    if ($page == "") { $page = 1 ; }
    if (isset($cookie[3]) AND $user_news == 1) {
   $num = $cookie[3];
    } else {
   $num = $storyhome;
    }
    $offset = ($page-1) * $num ;
$sql = $db->sql_query("SELECT news_id FROM ".$prefix."_bbtopics WHERE news_id > 0");
$numrows = $db->sql_fetchrow($sql);
if($numrows > 0){
    $result = $db->sql_query("select post_id from ".$prefix."_bbapprove_posts");
   $numrows2 = $db->sql_numrows($result);
   if($numrows2 == "0"){
      $topicpost = "";
   }
   elseif($numrows2 > "0"){
      $topicpost = "";

      while(list($post_id) = $db->sql_fetchrow($result)){
         $topicpost .= " AND topic_first_post_id<>$post_id";
        }
}
        $forumaccesssql = $db->sql_query("select forum_id from ".$prefix."_bbforums");
      $access = "";
                while(list($forum_id) = $db->sql_fetchrow($forumaccesssql)){
                $is_auth = array();
                $is_auth = authcheck(0, $forum_id, $forum_row);
                if ( !$is_auth['auth_read'] ){
                               $access .= " AND forum_id<>$forum_id";
                }
                }
                if ($news_id != 0) {
                $sql_count = "select * from ".$prefix."_bbtopics where news_id = $news_id $topicpost $access";
                }else{
           $sql_count = "select * from ".$prefix."_bbtopics where news_id > 0 $topicpost $access";
                }
                $result_count = $db->sql_query($sql_count);
                $news_count = $db->sql_numrows($result_count);
                $total_pages = ceil($news_count / $num);

         $sql = "SELECT topic_id, forum_id, topic_poster, topic_replies, topic_title, topic_views, topic_time, topic_first_post_id, news_id FROM ".$prefix."_bbtopics WHERE ";
        if($news_id == 0 & $id == 0 & $page == 1){
         $sql .= "news_id > 0 $topicpost $access ORDER BY `topic_time` DESC LIMIT $num";
      }elseif($news_id == 0 & $id == 0 & $page != 1){
         $sql .= "news_id > 0 $topicpost $access ORDER BY `topic_time` DESC limit $offset, $num";
      }elseif ($news_id == 0 & $id != 0){
         $sql .= "topic_id = ".$id." and news_id > 0 $topicpost $access";
      }elseif($news_id != 0 & $page != 1){
         $sql .= "news_id = ".$news_id." $topicpost $access ORDER BY `topic_time` DESC limit $offset, $num";
       }else{
         $sql .= "news_id = ".$news_id." $topicpost $access ORDER BY `topic_time` DESC LIMIT $num";
      }
   $result = $db->sql_query($sql);
   while($row = $db->sql_fetchrow($result)){
      if($id != 0){
      $sql = "UPDATE ".$prefix."_bbtopics SET topic_views = topic_views + 1 WHERE topic_id =" . $id;
      $db->sql_query($sql);
      }

                $newssql = "SELECT u.username, n.*, p.*, pt.*, c.config_value, t.topic_views, an.user_dateformat, an.user_timezone
                FROM ".$user_prefix."_users u, ".$prefix."_bbnews n, ".$prefix."_bbposts p, ".$prefix."_bbposts_text pt, ".$prefix."_bbconfig c, ".$prefix."_bbtopics t, ".$user_prefix."_users an
                WHERE u.user_id=$row[topic_poster] AND n.news_id=$row[news_id] AND p.post_id=$row[topic_first_post_id] AND pt.post_id=$row[topic_first_post_id] AND c.config_name='news_item_trim' AND t.topic_id=$row[topic_id] AND an.user_id=1";
      $newsresult = $db->sql_query($newssql);
      $newsrow = $db->sql_fetchrow($newsresult);

      $story_link = "<a href=\"modules.php?name=Forums&amp;file=viewtopic&t=$row[topic_id]\">";

      $numreplies = $db->sql_numrows($db->sql_query("SELECT * FROM ".$prefix."_bbposts WHERE (topic_id=$row[topic_id] AND post_id <> $row[topic_first_post_id])"));
      $aid = $newsrow[username];

      $trim_append_body = "...";
      $hometext = $newsrow['post_text'];
      $bbcode_uid = $newsrow['bbcode_uid'];
      $enable_smilies = $newsrow['enable_smilies'];
      $title = '';
                $pollsql = "select topic_id from ".$prefix."_bbvote_desc where topic_id = $row[topic_id]";
                $poll = $db->sql_query($pollsql);
                $pollrow = $db->sql_fetchrow($poll);
                if ($pollrow!=''){
      $title .= 'Poll:&nbsp;';
      }
      $title .= stripslashes($row[topic_title]);
      $notes = "";
      //$time = gmdate($userinfo[user_dateformat], $row[topic_time] + (3600 * $userinfo[user_timezone]));
      $time = gmdate('Y-m-d H:i:s', $row[topic_time] + (3600 * $tz));
      $time = formatTimestampfna($time);
      if($newsrow[config_value] > 0 AND strlen(preg_replace('#(<)([\/]?.*?)(>)#is', "", preg_replace('#(\[)([\/]?.*?)(\])#is', "",$hometext))) > $newsrow[config_value] & $id == 0){
            $hometext = trimText($newsrow['post_text'], $newsrow[config_value], $trimmed);
            $hometext = parseMessage( $hometext, $bbcode_uid );
            //$hometext = acronym_pass( $hometext );
         }elseif ( $id == 0 AND strpos( $hometext, htmlspecialchars( '<!--break-->' ) ) != false ){
                                $hometext = trimText2($newsrow['post_text']);
                                $hometext = parseMessage( $hometext, $bbcode_uid );
                                //$hometext = acronym_pass( $hometext );
                        }else{
                                $hometext = parseMessage( $newsrow['post_text'], $bbcode_uid );
                                //$hometext = acronym_pass( $hometext );
                        }
             $readmore = "<a href=\"modules.php?name=".$module_name."&amp;id=$row[topic_id]\">"._FN_READMORE."</a>";
             $text2 = substr($hometext, -3);
                if ( $is_auth['auth_reply'] ){
                               $reply = " | (<a href=\"ftopic-reply-.html$row[topic_id]\">Add Comment</a>)";
                }
                if($text2 == "..."){
         $morelink = "( $story_link"._FN_VIEWCOMMENTS."</a> | $numreplies )$reply | ( $readmore )";
      }
                else
                {
         $morelink = "( $story_link"._FN_VIEWCOMMENTS."</a> | $numreplies )$reply";
      }
                $topiclink = "<a href=\"modules.php?name=".$module_name."&news_id=$row[news_id]\">";
                themeindex($aid, $aid, $time, $title, $newsrow[topic_views], $title, $hometext, $notes, $morelink, $topic, $newsrow[news_image], $newsrow[news_category], $topiclink);
}
        pagination($total_pages, $news_id, $id, $page);
include("footer.php");
}
?>
 
technocrat







PostPosted: Wed Nov 16, 2005 11:29 am Reply with quote

Mighty_Y is good about supporting his projects.

Try changing include("mainfile.php"); to include_once("mainfile.php");
 
Donovan







PostPosted: Wed Nov 16, 2005 12:34 pm Reply with quote

Mighty also said he wont support this on previous version of Nuke...only 7.5 or 7.6.

He probably would if I gave him time. Would still like to install FNA 3.0 if it is compatible with Nuke 7.3


Anyway.... You are the MAN!!!!!!!!

That did it.

Thanks a heap.
 
technocrat







PostPosted: Wed Nov 16, 2005 12:39 pm Reply with quote

Np glad to help.
 
Display posts from previous:       
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> Modules

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 can attach files in this forum
You can download files in this forum


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