When I download a module, none of the adv_setting information appears to be in the module file?
When I download a module, none of the adv_setting information appears to be in the module file?
Which module are you downloading, and which version of the CMPS are you running?
I'm running 2.0 RC1 with the RC2 fix manually applied.Originally Posted by Brian
I've tried this on my own module I've developed as well as several of the built-ins, news, etc.
Neither a search, nor a carefull examination of the .module file shows any evidence of the adv_settings information. Here is a download of minical. Note there should be info for the "Calendar To Display" adv_setting.
PHP Code:
a:3:{s:6:"module";s:538:"a:12:{s:5:"title";s:13:"Mini Calendar";s:10:"identifier";s:8:"calendar";s:8:"filename";s:16:"minicalendar.php";s:7:"inctype";s:8:"php_file";s:6:"parent";s:0:"";s:12:"templatelist";s:130:"adv_portal_calendar_week,adv_portal_calendar_header,adv_portal_calendar_day,adv_portal_calendar_day_other, calendar_smallmonth_day";s:7:"colspan";s:1:"7";s:8:"formcode";s:0:"";s:11:"cleanoutput";s:1:"0";s:7:"options";s:0:"";s:8:"useshell";s:1:"1";s:4:"link";s:84:"$vboptions[bburl]/calendar.php?$session[sessionurl]c=$mod_options[portal_calendarid]";}";s:9:"templates";s:2022:"a:5:{s:23:"adv_portal_calendar_day";s:478:"<td class="<if condition="$show['highlightweek']">alt2<else />alt1</if>"<if condition="$show['highlighttoday']"> style="border:solid 1px red; font-weight:bold" title="$vbphrase[today]"</if>>
<if condition="$show['daylink']">
<span class="smallfont"><b><a style="color:green" href="calendar.php?$session[sessionurl]do=getinfo&day=$year-$month-$day&c=$calendarid" title="$eventdesc">$day</a></b></span>
<else />
<span class="smallfont">$day</span>
</if>
</td>";s:29:"adv_portal_calendar_day_other";s:40:"<td class="smallfont"><em>$day</em></td>";s:26:"adv_portal_calendar_header";s:588:"<tr>
<if condition="$show['day1']"><td align="center" class="thead">$day1</td></if>
<if condition="$show['day2']"><td align="center" class="thead">$day2</td></if>
<if condition="$show['day3']"><td align="center" class="thead">$day3</td></if>
<if condition="$show['day4']"><td align="center" class="thead">$day4</td></if>
<if condition="$show['day5']"><td align="center" class="thead">$day5</td></if>
<if condition="$show['day6']"><td align="center" class="thead">$day6</td></if>
<if condition="$show['day7']"><td align="center" class="thead">$day7</td></if>
</tr>
$calendarrowbits
";s:24:"adv_portal_calendar_week";s:44:"<tr align="center">
$calendardaybits
</tr>
";s:23:"calendar_smallmonth_day";s:658:"<!-- a single day on the small calendars -->
<td class="<if condition="$show['highlightweek']">alt2<else />alt1</if>"<if condition="$show['highlighttoday']"> style="border:solid 1px red; font-weight:bold" title="$vbphrase[today]"</if>>
<if condition="$show['daylink']">
<if condition="$show['dontshowweek']"><span class="smallfont"></if><a href="$vboptions[bburl]/calendar.php?$session[sessionurl]do=getinfo&day=$year-$month-$day&c=$calendarid" title="$eventdesc">$day</a><if condition="$show['dontshowweek']"></span></if>
<else />
<if condition="$show['dontshowweek']"><span class="smallfont">$day</span><else />$day</if>
</if>
</td>
";}";s:4:"file";s:3417:"<?php
// ++=========================================================================++
// || vBadvanced CMPS v2.0 RC1 - 7192
// || © 2003-2004 vBadvanced.com & PlurPlanet, LLC - All Rights Reserved
// || This file may not be redistributed in whole or significant part.
// || http://www.vbadvanced.com
// || Downloaded 06:19, Fri Jun 10th 2005
// ||
// ++ ========================================================================++
// ######################### Calendar #########################
if ($mod_options['portal_calendarid'])
{
require_once('./includes/functions_calendar.php');
if ($mod_options['portal_calendarid'] != -1)
{
if (!$bbuserinfo['calendarpermissions']["$mod_options[portal_calendarid]"])
{
$cpermcache = array();
$cperms = $DB_site->query("SELECT usergroupid, calendarpermissions FROM " . TABLE_PREFIX . "calendarpermission WHERE usergroupid IN(" . implode(',', $bbuserinfo['usergrouparray']) . ") AND calendarid = '$mod_options[portal_calendarid]'");
while ($cperm = $DB_site->fetch_array($cperms))
{
$cpermcache["$cperm[usergroupid]"] = $cperm['calendarpermissions'];
}
foreach ($bbuserinfo['usergrouparray'] AS $ugid)
{
if (isset($cpermcache["$ugid"]))
{
$bbuserinfo['calendarpermissions']["$mod_options[portal_calendarid]"] |= $cpermcache["$ugid"];
}
else
{
$bbuserinfo['calendarpermissions']["$mod_options[portal_calendarid]"] |= $usergroupcache["$bbuserinfo[usergroupid]"]['calendarpermissions'];
}
}
}
$calendarinfo = $DB_site->query_first("SELECT * FROM " . TABLE_PREFIX . "calendar WHERE calendarid = $mod_options[portal_calendarid]");
}
if ($bbuserinfo['startofweek'] > 7 OR $bbuserinfo['startofweek'] < 1)
{
$bbuserinfo['startofweek'] = $calendarinfo['startofweek'];
}
$today = getdate(TIMENOW - $vboptions['hourdiff']);
$today['month'] = $vbphrase[strtolower($today['month'])];
$year = $today['year'];
$month = $today['mon'];
$usertoday = array('firstday' => gmdate('w', gmmktime(0, 0, 0, $month, 1, $year)), 'month' => $month, 'year' => $year,);
if ($calendarinfo)
{
$calendarinfo = array_merge($calendarinfo, convert_bits_to_array($calendarinfo['options'], $_CALENDAROPTIONS));
$calendarinfo = array_merge($calendarinfo, convert_bits_to_array($calendarinfo['holidays'], $_CALENDARHOLIDAYS));
$range = array();
$range['frommonth'] = $month;
$range['fromyear']= $year;
$range['nextmonth'] = $month;
$range['nextyear'] = $year;
$eventcache = cache_events($range);
}
if ($mod_options['portal_calendarid'] == -1)
{
$calendarinfo['showweekends'] = 1;
}
$templatecache['calendar_smallmonth_header'] = $templatecache['adv_portal_calendar_header'];
$templatecache['calendar_smallmonth_week'] = $templatecache['adv_portal_calendar_week'];
$templatecache['calendar_smallmonth_day'] = $templatecache['adv_portal_calendar_day'];
$templatecache['calendar_smallmonth_day_other'] = $templatecache['adv_portal_calendar_day_other'];
$calendarbits = str_replace('"calendar.php', '"' . $vboptions['bburl'] . '/calendar.php', construct_calendar_output($today, $usertoday, $calendarinfo, 0, ''));
$stylevar['oldcellpadding'] = $stylevar['cellpadding'];
$stylevar['cellpadding'] = 4;
$mods['title'] = $vbphrase["$months[$month]"] . ' ' . $year;
$home["$mods[modid]"]['content'] = $calendarbits;
unset($calendarinfo, $eventcache, $calendarbits, $usertoday, $range);
}
?>";}
I'm not too sure how this got changed, but if you'll look in your admincp/vba_cmps_admin.php file for this code:
And change it to this:PHP Code:
if ($module['inctype'] == 'template')
Then that should take care of the problem.PHP Code:
if ($module['inctype'] == 'php_file')
Yep, that did the trick. Thanks!
There are currently 1 users browsing this thread. (0 members and 1 guests)