Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Ravens PHP Scripts And Web Hosting Forum Index -> phpnuke 7.6
Author Message
digitalpimp
Client



Joined: Aug 11, 2005
Posts: 32

PostPosted: Sun Aug 14, 2005 3:45 am Reply with quote

I found this today:

http://spidean.mckenzies.net/SpideanForums+viewthread-tid-3459.phtml

Quote:
I tested with 1.7 by copying 1 file at a time from the 3.0 patch and all was well untill I copied the blocks over. There are problems with the following blocks:

block-Languages.php
block-Modules.php
block-Who_is_Online.php

-Shawn


I know that it is Shawn's responsibility to get his program up to code but since he is unwilling is there anything Raven or Chatserv can do to help? I for one know that I would be willing to pay to get my theme working again on my site. Is there any code changes that can be made to get operational again without compromising security? I don't even use 2 of the 3 blocks listed anyways (languages/who's online).

edit:

http://spidean.mckenzies.net/SpideanForums+viewthread-tid-3478.phtml

Quote:
Seems that the new "BLOCK_FILE" variable isn't defined.
It gets defined in mainfile.php, but I don't think autothemes uses that file. Or at least the block function where it's defined.


Quote:
Yes it is. I think some of the problems arise from some new variables that are declared in some of the functions in mainfile.php that aren't used in Autothemes.
Autothemes uses it's own functions to display blocks,modules, messages ,etc.


this mean anything? Can you tell I am an uber n00b? LoL
 
View user's profile Send private message
chatserv
Member Emeritus



Joined: May 02, 2003
Posts: 1389
Location: Puerto Rico

PostPosted: Sun Aug 14, 2005 10:16 am Reply with quote

Looking into the files the only piece of code i could find at quick glance that resembled mainfile.php's block generating code was located in modules/AutoTheme/includes/php-nuke/atAPI.php, more precisely the atBlockLoad function which i would change to:
Code:
function atBlockLoad($location="", $title="")

{
    $dbi = $GLOBALS['dbi'];
    $prefix = $GLOBALS['prefix'];
    if(!defined('BLOCK_FILE')) {
      define('BLOCK_FILE', true);
    }

    if ($GLOBALS['multilingual']) {
       $querylang = "AND (blanguage='".atGetLang()."' OR blanguage='')";
    }
    else {
       $querylang = "";
    }
    $version = atGetPlatformVersion();
   
    if ($version >= 6.5) {
        $posfield = "bposition";
    }
    else {
        $posfield = "position";
    }
    if ($location) {
        $result = sql_query("SELECT bid, bkey, title, content, url, blockfile, view, ".$posfield." FROM ".$prefix."_blocks WHERE ".$posfield."='$location' AND active='1' $querylang ORDER BY weight ASC", $dbi);
    }
    elseif ($title) {
        $result = sql_query("SELECT bid, bkey, title, content, url, blockfile, view, ".$posfield." FROM ".$prefix."_blocks WHERE title='$title' AND active='1' $querylang ORDER BY weight ASC", $dbi);
    }
    while (list($bid, $bkey, $title, $content, $url, $blockfile, $view, $position) = sql_fetch_row($result, $dbi)) {
        $block = compact("bid", "bkey", "title", "content", "position", "url", "blockfile", "view");

      atRunningSetVar("block", $block);

        if ($bkey == "admin") {
            adminblock();
        }
        elseif ($bkey == "userbox") {
            userblock();
        }
        elseif (empty($bkey)) {
            $displaythis = 0;

            if ($view == 0) {
                $displaythis = 1;
            }
            elseif ($view == 1 && atIsLoggedIn() || atIsAdminUser()) {
                $displaythis = 1;
            }
            elseif ($view == 2 && atIsAdminUser()) {
                $displaythis = 1;
            }
            elseif ($view == 3 && !atIsLoggedIn() || atIsAdminUser()) {
                $displaythis = 1;
            }
            if ($displaythis) {
                if (empty($url)) {
                    if (empty($blockfile)) {
                        themesidebox($title, $content);
                    }
                    else {
                        blockfileinc($title, $blockfile);
                    }
                }
                else {
                    headlines($bid);
                }
            }
        }
    }
}
 
View user's profile Send private message Visit poster's website
digitalpimp







PostPosted: Sun Aug 14, 2005 12:48 pm Reply with quote

Thanks for taking a look Chatserv! I made the code change but had the same results. =(
 
Display posts from previous:       
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Ravens PHP Scripts And Web Hosting Forum Index -> phpnuke 7.6

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 ©