Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> Themes
Author Message
dmtalon
New Member
New Member



Joined: May 10, 2006
Posts: 21

PostPosted: Tue May 23, 2006 7:28 am Reply with quote

First off, I'm sure this isn't realated to RN or phpnuke treasury directly because I run that combo myself without problems.

I am taking over the webmaster role for a gaming clan and they were using nuke 7.9 with autotheme and a manual donation block.

I tried adding the phpnuke treasury v1.0 and all seems to work until you activate the donate-o-meter block. As soon as you add that block the admin panel breaks. You get a blank page with just the logout/exit icon and the footer text.

If you 'manually' put in the block config url it too is blank with no way to modify anything. I can, at this point see the donate-o-meter correctly on the left side of the website, but it looks like all 'center blocks' go away. Logging out of admin shows the left/right blocks, with no center section. The donate-o-meter block 'looks' fine.

In an effort to have a safer phpnuke I installed a fresh copy of RN76 v2.02.02 and installed the treasury, autotheme (required for the theme we are running). and the same thing happens.

If anyone's run across this or has an idea of what might be causing it I'd really appreciate it!

Thanks,

Dallace
 
View user's profile Send private message
gregexp
The Mouse Is Extension Of Arm



Joined: Feb 21, 2006
Posts: 1497
Location: In front of a screen....HELP! lol

PostPosted: Tue May 23, 2006 4:25 pm Reply with quote

before i make a fool of myself... Laughing

Is this just a module or somethin u install by adding files to the admin/modules folder?
 
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger MSN Messenger ICQ Number
dmtalon







PostPosted: Tue May 23, 2006 4:30 pm Reply with quote

yes, it is a module: [ Only registered users can see links on this board! Get registered or login! ]

Gives you the ability to track donations in real time (showing up in a block)

I've found that the PROBLEM must be somewhere at the end of the block, ie the block is not closing correctly, because as part of my troubleshooting it seemed that whatever was after the block died. I put the block at the end of the right side and everything seems to work 'ok' now.

This really points to the block not doing something right, but I'm not a coder and cannot figure it out.
 
gregexp







PostPosted: Tue May 23, 2006 4:42 pm Reply with quote

post the contents of the block for me and if u see the script command in there space it so it reads <scr ipt>

That way u dont have ne trouble on trying to post it in ths forum.
 
dmtalon







PostPosted: Tue May 23, 2006 5:03 pm Reply with quote

Here ya go...

Code:


<?php
/************************************************************************/
/* NukeTreasury - Financial management for PHP-Nuke                      */
/* Copyright (c) 2004 by Dave Lawrence AKA Thrash                       */
/*                       thrash@fragnastika.com                         */
/*                       thrashn8r@hotmail.com                          */
/*                                                                      */
/* 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.       */
/*                                                                      */
/* This program is distributed in the hope that it will be useful, but  */
/* WITHOUT ANY WARRANTY; without even the implied warranty of           */
/* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU     */
/* General Public License for more details.                             */
/*                                                                      */
/* You should have received a copy of the GNU General Public License    */
/* along with this program; if not, write to the Free Software          */
/* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307  */
/* USA                                                                  */
/************************************************************************/

if (eregi("block-Donat_o_Meter.php",$_SERVER['PHP_SELF'])) {
    Header("Location: index.php");
    die();
}

global $user, $cookie, $prefix, $db, $user_prefix;

include("modules/Donations/config.php");

if( !$ipnppd )
{
   $content = "There is an error in your SQL configuration. Check modules/Donations/config.php for the correct SQL settings";
}
else
{
   global $content;
   
   $swingd = $tr_config[swing_day];
   if(!($swingd > 0 AND $swingd < 32))
      $swingd = 6;
   
   $dmshowdate = $tr_config[dm_show_date];
   $dmshowamt = $tr_config[dm_show_amt];
   $DM_TITLE = $tr_config[dm_title];
   
   if(!$DM_TITLE)
      $DM_TITLE = "Help keep us going!";
      
   if(is_numeric($tr_config[dm_num_don]) && $tr_config[dm_num_don] > 0 )
      $dmlen = $tr_config[dm_num_don];
   else if (is_numeric($dmlen) && $dmlen ==0)
      $dmlen = -1;
   else
      $dmlen = 10;
      
   // Check the current day against the swing day to execute the proper query
   if( date('d') >= $swingd )
   {
      $query_Recordset1 = ' SELECT business, COUNT( mc_gross ) AS count, SUM( mc_gross ) AS gross, SUM( mc_gross - mc_fee ) AS net, DATE_FORMAT( NOW( ) , \'%M\' ) AS mon, '
         . ' DATE_FORMAT( SUBDATE( DATE_FORMAT( ADDDATE( NOW( ) , INTERVAL 1 MONTH ) , \'%Y-%c-1\' ) , INTERVAL 1 DAY ) , \' %b %e\' ) AS due_by, '
         . ' DATE_FORMAT( NOW( ) , \'%b\' ) AS mon_short'
         . ' FROM transactions'
         . ' WHERE ( transactions.payment_date >= DATE_FORMAT( NOW( ) , \'%Y-%m-' . $swingd . '\' ) ) '
         . ' GROUP BY business';
   
      $query_Recordset3 = 'SELECT custom AS name, option_selection1 as showname, ';
      $query_Recordset3 .= 'DATE_FORMAT( payment_date, \'%b-%e\' ) AS date, ';
      $query_Recordset3 .= 'CONCAT(\'$\',SUM(mc_gross)) AS amt ';
      $query_Recordset3 .= ' FROM transactions'
         . ' WHERE ( transactions.payment_date >= DATE_FORMAT( NOW( ) , \'%Y-%m-' . $swingd . '\' ) ) '
         . ' GROUP BY txn_id ORDER BY payment_date DESC';
   } else
   {
      $query_Recordset1 = ' SELECT business, COUNT( mc_gross ) AS count, SUM( mc_gross ) AS gross, SUM( mc_gross - mc_fee ) AS net, DATE_FORMAT( SUBDATE( NOW( ) , INTERVAL ' . $swingd . ' '
         . ' DAY ) , \'%M\' ) AS mon, \'Now!\' AS due_by, DATE_FORMAT( SUBDATE( NOW( ) , INTERVAL ' . $swingd . ' '
         . ' DAY ) , \'%b\' ) AS mon_short'
         . ' FROM transactions'
         . ' WHERE ( transactions.payment_date < DATE_FORMAT( NOW( ) , \'%Y-%m-' . $swingd . '\' ) ) AND transactions.payment_date > DATE_FORMAT( SUBDATE( NOW( ) , INTERVAL ' . $swingd . ' '
         . ' DAY ) , \'%Y-%m-' . $swingd . '\' )'
         . ' GROUP BY business ';
   
      $query_Recordset3 = 'SELECT custom AS name, option_selection1 as showname, ';
      $query_Recordset3 .= 'DATE_FORMAT( payment_date, \'%b-%e\' ) AS date, ';
      $query_Recordset3 .= 'CONCAT(\'$\',SUM(mc_gross)) AS amt ';
      $query_Recordset3 .= ' FROM transactions'
         . ' WHERE ( transactions.payment_date < DATE_FORMAT( NOW( ) , \'%Y-%m-' . $swingd . '\' ) ) AND transactions.payment_date > DATE_FORMAT( SUBDATE( NOW( ) , INTERVAL ' . $swingd . ' '
         . ' DAY ) , \'%Y-%m-' . $swingd . '\' ) '
         . ' GROUP BY txn_id ORDER BY payment_date DESC';
   }
   
   // Get the donation totals
   $Recordset1 = mysql_query($query_Recordset1, $ipnppd) or die(mysql_error());
   $row_Recordset1 = mysql_fetch_assoc($Recordset1);
   //If there are not records, then get "null" data
   if( !$row_Recordset1 )
   {
      $query_Recordset1 = ' SELECT \'\' AS business, \'0\' AS count, \'0\' AS gross, \'0\' AS net, DATE_FORMAT( NOW( ) , \'%M\' ) AS mon, DATE_FORMAT( SUBDATE( DATE_FORMAT( ADDDATE( NOW( ) , INTERVAL 1 '
         . ' MONTH ) , \'%Y-%c-1\' ) , INTERVAL 1 '
         . ' DAY ) , \' %b %e\' ) AS due_by, DATE_FORMAT( NOW( ) , \'%b\' ) AS mon_short'; 
      $Recordset1 = mysql_query($query_Recordset1, $ipnppd) or die(mysql_error());
      $row_Recordset1 = mysql_fetch_assoc($Recordset1);
   }
   
   // Get the goal
   $query_Recordset2 = $sql = 'SELECT * FROM config WHERE name=\'goal\' AND subtype=\'' . $row_Recordset1['mon_short'] . '\'';
   $Recordset2= mysql_query($query_Recordset2, $ipnppd) or die(mysql_error());
   $row_Recordset2 = mysql_fetch_assoc($Recordset2);
   
   // Set our remaining template vars
   $DM_MON = $row_Recordset1[mon];
   $DM_GOAL = sprintf('$%.02f', $row_Recordset2['value']);
   $DM_DUE = $row_Recordset1['due_by'];
   $DM_NUM = $row_Recordset1['count'];
   $DM_GROSS = sprintf('$%.02f',$row_Recordset1['gross']);
   $DM_NET = sprintf('$%.02f',$row_Recordset1['net']);
   $DM_LEFT = sprintf('$%.02f', $row_Recordset2['value'] - $row_Recordset1['net']);
   $DM_BUTTON = $tr_config[dm_button];
   $DM_BUTT_DIMS = '';
   if( is_numeric($tr_config[dm_img_width]) )
      $DM_BUTT_DIMS .= "width=\"$tr_config[dm_img_width]\" ";
   if( is_numeric($tr_config[dm_img_height]) )
      $DM_BUTT_DIMS .= "height=\"$tr_config[dm_img_height]\" ";
   
   // Load the template
   $tmpl_file = "modules/Donations/Donatometer.html";
   $thefile = implode("", file($tmpl_file));
   $thefile = addslashes($thefile);
   $thefile = "\$r_file=\"".$thefile."\";";
   eval($thefile);
   $content = $r_file;
   
   // Do we want to display the donators?
   if(is_numeric($dmlen) && $dmlen >= 0 )
   {
      // Get the list of donators
      $Recordset3= mysql_query($query_Recordset3, $ipnppd) or die(mysql_error());
   
      $content .= "<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"100%\">"
              . "<tr><td width=\"100%\"><hr></td><td  width=\"11\"><a href=\"javascript:openwindow()\">&copy;</a></td></tr>"
              . "<tr><td align=\"center\" colspan=\"2\"><b><u>Donations</u></b></td></tr>";
   
      // List all the donators
      $i = 0;
      while ( ($row_Recordset3 = mysql_fetch_assoc($Recordset3)) && ($i != $tr_config[dm_num_don]) )
      {
         // Refunded transactions will show up with $0 amount
         if( $row_Recordset3['amt'] > "$0" )
         {
            // Observe the user's wish regarding revealing their name
            if( strcmp($row_Recordset3['showname'],"Yes") == 0)
               $name = $row_Recordset3['name'];
            else
               $name = "Anonymous";
            
            if( !$dmshowamt && !$dmshowdate )
               $dmalign = "center";
            else
               $dmalign = "right";
            $content .= "<tr><td width=\"100%\" align=\"$dmalign\" colspan=\"2\">";
            $content .=  $name;
            if( $dmshowamt )
               $content .= " $row_Recordset3[amt]";
            if( $dmshowdate )
               $content .= " $row_Recordset3[date]";
            $content .= "</td></tr>";
         }
         $i++;
      } ;
      $content .= "</table>";
   }
}

?>


Keep in mind too, that without 'autotheme' installed it seems to work fine left or right side.
 
gregexp







PostPosted: Tue May 23, 2006 8:46 pm Reply with quote

cant find ne problems with that block and im not familiar enough with auto theme to make a good opinion

Sorry but I cant find nething wrong with that block..but im only one person perhaps others will see somethin i missed.
 
dmtalon







PostPosted: Wed May 24, 2006 5:39 am Reply with quote

Hey I appreciate your attempt at least. I couldn't find anything either, but that didn't mean a whole lot. I basically just checked the {}'s and made sure there wasn't something silly in there.

Thanks again.

Dallace
 
montego
Site Admin



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

PostPosted: Wed May 24, 2006 5:43 am Reply with quote

I use the same block, so it must be a conflict with autotheme. Unfortunately, I too, do not have any experience with autotheme. I had read early on to avoid it so I just never picked it up and that was too long ago to remember why. We'll have to see if others have experience with this.

_________________
Where Do YOU Stand?
HTML Newsletter::ShortLinks::Mailer::Downloads and more... 
View user's profile Send private message Visit poster's website
dmtalon







PostPosted: Wed May 24, 2006 6:46 am Reply with quote

Well,

it seems to work on the right side of the website, so I'm at least not completely stuck.
 
montego







PostPosted: Wed May 24, 2006 6:49 am Reply with quote

Well, now that sounds like it could possibly be a module conflict. Does it also break the non-admin module pages?
 
dmtalon







PostPosted: Wed May 24, 2006 7:15 am Reply with quote

what is the non-admin module page?

It breaks the whole admin pages, and center section of the website.
 
montego







PostPosted: Wed May 24, 2006 7:19 am Reply with quote

What I mean is accessing a module page rather than the admin links. For example, can you get to Downloads module? Need to rule out admin vs. module vs. autotheme conflict.
 
dmtalon







PostPosted: Wed May 24, 2006 7:55 am Reply with quote

Well, it typical fasion... the hosting company is having some issues and I cannot access the site <sigh> I'll check that out and let you know ASAP

Thanks,

Dallace
 
dmtalon







PostPosted: Fri May 26, 2006 8:01 am Reply with quote

removed because I'm a silly boy
 
Display posts from previous:       
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> Themes

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 ©