You are missing our premiere tool bar navigation system! Register and use it for FREE!

NukeCops  
•  Home •  Downloads •  Gallery •  Your Account •  Forums • 
Readme First
- Readme First! -

Read and follow the rules, otherwise your posts will be closed
Modules
· Home
· FAQ
· Buy a Theme
· Advertising
· AvantGo
· Bookmarks
· Columbia
· Community
· Donations
· Downloads
· Feedback
· Forums
· PHP-Nuke HOWTO
· Private Messages
· Search
· Statistics
· Stories Archive
· Submit News
· Surveys
· Theme Gallery
· Top
· Topics
· Your Account
Who's Online
There are currently, 66 guest(s) and 0 member(s) that are online.

You are Anonymous user. You can register for free by clicking here
Nuke Cops :: View topic - nuCalendar [ ]
 Forum FAQ  •  Search  •   •  Memberlist  •  Usergroups   •  Register  •  Profile •    •  Log in to check your private messages  •  Log in

 
Post new topic  Reply to topicprinter-friendly view
View previous topic Log in to check your private messages View next topic
Author Message
ProverbDoll
Corporal
Corporal


Joined: Jul 22, 2005
Posts: 55

Location: Wyoming, USA

PostPosted: Wed Jan 04, 2006 12:42 pm Reply with quoteBack to top

Okay I now have my nuCalendar up, but when I am logged in I am unable to click on the graphic and edit events and such. It says Access Denied.

Also I want to put this into a block. How do I do that?
Find all posts by ProverbDollView user's profileSend private message
ethana
Sergeant
Sergeant


Joined: Dec 26, 2005
Posts: 81


PostPosted: Wed Jan 04, 2006 12:48 pm Reply with quoteBack to top

Are you using a newer version of nuke? Do you need to switch from


Code:
if (!eregi("".$admin_file.".php", $_SERVER['PHP_SELF'])) { die ("Access Denied"); }


to

Code:
if (!defined('ADMIN_FILE')) {
        die ("Access Denied");
}


?

I think i might have an older version of nucalendar but check in the /root/admin/modules for nucalendar.php or something similar and see if this is the case. Also, for a block...i thought i came with one? I have nucalendar running on 7.7 but i believe 7.8 adapted the changes...their going towards using constants now rather than what you see above.
Find all posts by ethanaView user's profileSend private message
ProverbDoll
Corporal
Corporal


Joined: Jul 22, 2005
Posts: 55

Location: Wyoming, USA

PostPosted: Wed Jan 04, 2006 12:55 pm Reply with quoteBack to top

I am using nuke 7.7 and the latest version of nuCalendar.
Find all posts by ProverbDollView user's profileSend private message
ProverbDoll
Corporal
Corporal


Joined: Jul 22, 2005
Posts: 55

Location: Wyoming, USA

PostPosted: Wed Jan 04, 2006 1:03 pm Reply with quoteBack to top

Is this the right code?
Code:
if (!eregi("admin.php", $PHP_SELF)) { die ("Access Denied"); }
This is the only one I found in that file that was the closest to what you said.

As for the block... I am not sure. Is there something I am suppose to do to make it into a block?
Find all posts by ProverbDollView user's profileSend private message
ethana
Sergeant
Sergeant


Joined: Dec 26, 2005
Posts: 81


PostPosted: Wed Jan 04, 2006 1:52 pm Reply with quoteBack to top

Now that i think about it, i had a problem with this too...the problem was the sql query that it was using to look up the admin users...i changed it to this:

Code:
$result = sql_query("select radminsuper from ".$prefix."_authors where aid='$aid'", $dbi);


I cant remember what it was doing wrong before...think it was selecting the wrong column or something of that nature. Post what your sql query is that is located at the top of the /root/admin/module/nucalendar.php
Find all posts by ethanaView user's profileSend private message
ProverbDoll
Corporal
Corporal


Joined: Jul 22, 2005
Posts: 55

Location: Wyoming, USA

PostPosted: Wed Jan 04, 2006 2:24 pm Reply with quoteBack to top

Yay! It worked! You rock! Thank you!

Now how do I get it in a block?
Find all posts by ProverbDollView user's profileSend private message
ethana
Sergeant
Sergeant


Joined: Dec 26, 2005
Posts: 81


PostPosted: Wed Jan 04, 2006 2:27 pm Reply with quoteBack to top

Shouldve come with it, but if it hasnt, here is one...hopefully it can post all of it. Name it whatever but i got it as block-Upcoming_Events.php.

Enjoy.

Code:
<?php
/************************************************************************/
/* NuCalendar                                                           */
/* ===========================                                          */
/*                                                                      */
/* Copyright (c) 2003 by Bill Smith                                     */
/* http://www.vettesofthetropics.com                                    */
/*                                                                      */
/* Based on Web Calendar                                                */
/* Copyright (c) 2001 by Proverbs, LLC                                  */
/* http://www.proverbs.biz                                              */
/*                                                                      */
/* 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.       */
/************************************************************************/

/*
 *  ©2001 Proverbs, LLC. All rights reserved.
 *
 *  This program is free software; you can redistribute it and/or modify it withthe following stipulations:
 *  Changes or modifications must retain all Copyright statements, including, but not limited to the Copyright statement
 *  and Proverbs, LLC homepage link provided at the bottom of this page.
 */

if (eregi("block-Upcoming_Events.php",$PHP_SELF)) {
    Header("Location: index.php");
    die();
}

require_once("modules/NuCalendar/dbaccess.inc.php");
require_once("modules/NuCalendar/datefuncs.php");
require_once("modules/NuCalendar/printevent.php");


$content = "<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\"  width=\"100%\">";
        $numFound = 0;
        $numDaysTested = 0;
        $ulmonth = date("m");
        $ulmonth++;
        $ulmonth--;
        $ulyear = date("Y");
        $ulday = date("d");
        $ulday++;
        $ulday--;
        $ulday++;
        $ulday--;
        global $dbi, $user_prefix;

        $caloptions = sql_query("SELECT * FROM ".$user_prefix."_nucal_options WHERE 1", $dbi);

        $caloptionrow = sql_fetch_array($caloptions, $dbi);

        $maxFound = $caloptionrow[show_n_events];
        $maxDaysTested = $caloptionrow[in_n_days];

        function DisplayEventsCategory($myrow)
        {
                global $user_prefix, $dbi;
                $result = sql_query("SELECT * FROM ".$user_prefix."_nucal_categories WHERE id='$myrow[categoryid]'", $dbi);
                $rtnVal = 0;

                $catrow = sql_fetch_array($result, $dbi);

                return $catrow[showinblock];
        }

        function DisplayInfo($ulmonth, $ulday, $ulyear, $myrow)
        {
                $rtnVal = "";

                $rtnVal .= "<tr><td width=\"30%\" valign=\"top\">"
                . "<font size=1>" . GetMonthDayText($ulmonth, $ulday) . "</font>&nbsp;&nbsp;&nbsp;"
                . "</td><td width=\"70%\">"
                . "<font size=1>" . PrintShortEvent($myrow, $ulmonth, $ulday, $ulyear)."</font>"
                . "</td></tr>";

                return $rtnVal;

        }


        while ($numFound  < $maxFound  && $numDaysTested < $maxDaysTested) {
                $uldayofweek = date("w", mktime(0, 0, 0, $ulmonth, $ulday, $ulyear));

                if ($caloptionrow[show_bydate_in_block] == 1) {
                        $resultID = Calendar_GetByDate($ulmonth, $ulday, $ulyear);
                        if ($resultID) {
                                $nr = sql_num_rows($resultID, $dbi);
                                for ($k=0;$k<$nr;$k++)
                                                                                                            44,2-9        25%
                                $nr = sql_num_rows($resultID, $dbi);
                                for ($k=0;$k<$nr;$k++)
                                {
                                        $myrow = sql_fetch_array($resultID, $dbi);
                                        if ($numFound < $maxFound) {
                                                if (DisplayEventsCategory($myrow)) {
                                                        $content.= DisplayInfo($ulmonth, $ulday, $ulyear, $myrow);
                                                        $numFound++;
                                                }
                                        }
                                }
                        }
                }
                if ($caloptionrow[show_yearly_in_block] == 1) {
                        $resultID = Calendar_GetYearly($ulmonth, $ulday);
                        if ($resultID) {
                                $nr = sql_num_rows($resultID, $dbi);
                                for ($k=0;$k<$nr;$k++)
                                {
                                        $myrow = sql_fetch_array($resultID, $dbi);
                                        if ($numFound < $maxFound) {
                                                if (DisplayEventsCategory($myrow)) {
                                                        $content.= DisplayInfo($ulmonth, $ulday, $ulyear, $myrow);
                                                        $numFound++;
                                                }
                                        }
                                }
                        }
                }

                if ($caloptionrow[show_yearly_recurring_in_block] == 1) {
                        $resultID  = Calendar_GetYearlyRecurring($ulmonth, $uldayofweek);
                        if ($resultID) {
                                $nr = sql_num_rows($resultID, $dbi);
                                for ($k=0;$k<$nr;$k++)
                                {
                                        $myrow = sql_fetch_array($resultID, $dbi);
                                        $test = $ulday / 7;
                                        $period = $myrow[recur_period];
                                        if ($period == 5)
                                                $period = NumDotWInMonth($uldayofweek, $ulmonth, $ulyear);
                                        $periodlow = $period - 1;
                                        if ($test <= $period && $test > $periodlow) {
                                                if ($numFound < $maxFound) {
                                        if ($test <= $period && $test > $periodlow) {
                                                if ($numFound < $maxFound) {
                                                        if (DisplayEventsCategory($myrow)) {                                 
                                                                $content .= DisplayInfo($ulmonth, $ulday, $ulyear, $myrow);
                                                                $numFound += 1;
                                                        }
                                                }
                                        } else if ($period == 5 && $test >= 4  && $day+7 < NumDaysInMonth($month, $year)) {
                                                if ($test <= ($period-1) && $test > ($periodlow-1)) {
                                                        if ($numFound < $maxFound) {
                                                                if (DisplayEventsCategory($myrow)) {
                                                                        $content .= DisplayInfo($ulmonth, $ulday, $ulyear, $myrow);
                                                                        $numFound += 1;
                                                                }
                                                        }
                                                }
                                        }
                                }
                        }
                }

                if ($caloptionrow[show_monthly_in_block] == 1) {
                        $resultID = Calendar_GetMonthly($ulday);
                        if ($resultID) {
                                $nr = sql_num_rows($resultID, $dbi);
                                for ($k=0;$k<$nr;$k++)
                                {
                                        $myrow = sql_fetch_array($resultID, $dbi);
                                        if ($numFound < $maxFound) {
                                                if (DisplayEventsCategory($myrow)) {
                                                        $content.= DisplayInfo($ulmonth, $ulday, $ulyear, $myrow);
                                                        $numFound++;
                                                }
                                        }
                                }
                        }
                }

                if ($caloptionrow[show_monthly_recurring_in_block] == 1) {
                        $resultID = Calendar_GetMonthlyRecurring($uldayofweek);
                        if ($resultID) {
                                $nr = sql_num_rows($resultID, $dbi);
                                for ($k=0;$k<$nr;$k++)
                                $nr = sql_num_rows($resultID, $dbi);
                                for ($k=0;$k<$nr;$k++)
                                {
                                        $myrow = sql_fetch_array($resultID, $dbi);
                                        $period = $myrow[recur_period];
                                        if ($period == 5)
                                                $period = NumDotWInMonth($uldayofweek, $ulmonth, $ulyear);
                                        $test = $ulday / 7;
                                        $periodlow = $period - 1;
                                        if ($test <= $period && $test > $periodlow)
                                        {
                                                if ($numFound < $maxFound) {
                                                        if (DisplayEventsCategory($myrow)) {
                                                                $content.= DisplayInfo($ulmonth, $ulday, $ulyear, $myrow);
                                                                $numFound += 1;
                                                        }
                                                }
                                        }
                                }
                        }
                }
                if ($caloptionrow[show_weekly_in_block] == 1) {
                        $resultID = Calendar_GetWeekly($uldayofweek);
                        if ($resultID) {
                                $nr = sql_num_rows($resultID, $dbi);
                                for ($k=0;$k<$nr;$k++)
                                {
                                        $myrow = sql_fetch_array($resultID, $dbi);
                                        if ($numFound < $maxFound) {
                                                if (DisplayEventsCategory($myrow)) {
                                                        $content.= DisplayInfo($ulmonth, $ulday, $ulyear, $myrow);
                                                        $numFound++;
                                                }
                                        }
                                }
                        }
                }

                NextDay($ulmonth, $ulday, $ulyear);
                $numDaysTested += 1;
        }
$content .= "</table>";
?>
Find all posts by ethanaView user's profileSend private message
ProverbDoll
Corporal
Corporal


Joined: Jul 22, 2005
Posts: 55

Location: Wyoming, USA

PostPosted: Wed Jan 04, 2006 2:36 pm Reply with quoteBack to top

It's working now. Thank you. I just forgot to add a block. *feels dumb*
Find all posts by ProverbDollView user's profileSend private message
ethana
Sergeant
Sergeant


Joined: Dec 26, 2005
Posts: 81


PostPosted: Wed Jan 04, 2006 2:53 pm Reply with quoteBack to top

NP! I already fought with this module once before so im glad it not only solved my issue but yours as well.
Find all posts by ethanaView user's profileSend private message
ProverbDoll
Corporal
Corporal


Joined: Jul 22, 2005
Posts: 55

Location: Wyoming, USA

PostPosted: Wed Jan 04, 2006 3:06 pm Reply with quoteBack to top

Very Happy Well thanks!
Find all posts by ProverbDollView user's profileSend private message
ssace
Lieutenant
Lieutenant


Joined: Dec 29, 2005
Posts: 175


PostPosted: Sun Jan 22, 2006 6:20 pm Reply with quoteBack to top

I installed nuCalendar today and it seems to be working fine...BUT...in my site admin panel...when I click on the NUCALENDER icon, the administration area gives me these 2 messages:

Table 'ssadmin_snsnuke.nuke_nucal_bydate' doesn't exist
Table 'ssadmin_snsnuke.nuke_nucal_recurring' doesn't exist


I installed the sql file but these 2 table are not listed. Confused

The only tables that are showing up in the database is:

nuke_nucal_categories
nuke_nucal_events
nuke_nucal_options

The only thing that appears awkward is the calendar looks cramped a little. I'm using a theme that is narrow (800). Is there a way to adjust the size of the calendar?
Find all posts by ssaceView user's profileSend private message
ssace
Lieutenant
Lieutenant


Joined: Dec 29, 2005
Posts: 175


PostPosted: Sun Jan 22, 2006 6:31 pm Reply with quoteBack to top

One more thing. In the install instructions, it mentioned merging the mainfile.php. It also mentioned mergine language.php files. I wasn't sure how to do that. I didn't want to mess up my mainfile. As I mentioned earlier, the calendar seems to work but I'm not sure if this will catch up with me.

Do I need to merge these files & if so, how do you do that?
Find all posts by ssaceView user's profileSend private message
ssace
Lieutenant
Lieutenant


Joined: Dec 29, 2005
Posts: 175


PostPosted: Sun Feb 12, 2006 7:00 am Reply with quoteBack to top

ssace wrote:
I installed nuCalendar today and it seems to be working fine...BUT...in my site admin panel...when I click on the NUCALENDER icon, the administration area gives me these 2 messages:

Table 'ssadmin_snsnuke.nuke_nucal_bydate' doesn't exist
Table 'ssadmin_snsnuke.nuke_nucal_recurring' doesn't exist


I installed the sql file but these 2 table are not listed. Confused

The only tables that are showing up in the database is:

nuke_nucal_categories
nuke_nucal_events
nuke_nucal_options

The only thing that appears awkward is the calendar looks cramped a little. I'm using a theme that is narrow (800). Is there a way to adjust the size of the calendar?



Any help with this?...please
Find all posts by ssaceView user's profileSend private message
siasat
Nuke Cadet
Nuke Cadet


Joined: Jun 25, 2006
Posts: 1


PostPosted: Sun Jun 25, 2006 1:36 pm Reply with quoteBack to top

ssace wrote:
ssace wrote:
I installed nuCalendar today and it seems to be working fine...BUT...in my site admin panel...when I click on the NUCALENDER icon, the administration area gives me these 2 messages:

Table 'ssadmin_snsnuke.nuke_nucal_bydate' doesn't exist
Table 'ssadmin_snsnuke.nuke_nucal_recurring' doesn't exist


I installed the sql file but these 2 table are not listed. Confused

The only tables that are showing up in the database is:

nuke_nucal_categories
nuke_nucal_events
nuke_nucal_options

The only thing that appears awkward is the calendar looks cramped a little. I'm using a theme that is narrow (800). Is there a way to adjust the size of the calendar?



Any help with this?...please

This is my question too !
Find all posts by siasatView user's profileSend private message
Display posts from previous:      
Post new topic  Reply to topicprinter-friendly view
View previous topic Log in to check your private messages View next 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



Powered by phpBB © 2001, 2005 phpBB Group

Ported by Nuke Cops © 2003 www.nukecops.com
:: FI Theme :: PHP-Nuke theme by coldblooded (www.nukemods.com) ::
Powered by · TOGETHER TEAM srl ITALY http://www.togetherteam.it · DONDELEO E-COMMERCE http://www.DonDeLeo.com
Web site engine's code is Copyright © 2002 by PHP-Nuke. All Rights Reserved. PHP-Nuke is Free Software released under the GNU/GPL license.
Page Generation: 0.286 Seconds - 272 pages served in past 5 minutes. Nuke Cops Founded by Paul Laudanski (Zhen-Xjell)
:: FI Theme :: PHP-Nuke theme by coldblooded (www.nukemods.com) ::