I'm unable to use vBadvanced 3.0's integrate function on either browse.php or groups.php.
browse.php generates the following error:
Code:
PHP Fatal error: Cannot redeclare fetch_avatar_url() (previously declared in /ideletedmypath/forums/includes/functions_user.php:259) in /ideletedmypath/forums/includes/functions_grps.php on line 32
It seems to be related to this line, specifically the "OR" part:
Code:
if (!function_exists('fetch_avatar_url') OR THIS_SCRIPT != 'groupshome')
I think it needs to use a different method to determine whether to pull the function without using the "OR" statement. By using vBa's integration code, the THIS_SCRIPT variable seems to allow the function to be called again. A nested if seems to work, but I'm not the expert on this code.
Now then, groups.php creates a blank page with no error related to the vBa integration.
This is all I see inside the generated html:
Code:
<!-- END TEMPLATE: navbar -->
<table class="page" align="center" cellpadding="0" cellspacing="0" width="100%">
<tbody>
<tr valign="top">
</tr>
</tbody>
</table>
<!-- BEGIN TEMPLATE: footer -->
I assume that something in the groups.php is unique that clears out the variables used by vBa so it thinks there's no content to insert.
Here's is the adv_portal template, and you can that there are three if statements that display content in three columns. I think those variables are lost, which would cause the error:
Code:
<table align="center" class="page" cellspacing="0" cellpadding="0" width="100%">
<tr valign="top">
<if condition="$show['left_column']">
<td width="$vba_style[portal_leftcolwidth]"<if condition="$show['center_column'] OR $show['right_column']"> style="padding-right: $vba_style[portal_colspacing]px"</if>>
$home[leftblocks]
</td>
</if>
<if condition="$show['center_column']">
<td valign="top">
$home[centerblocks]
</td>
</if>
<if condition="$show['right_column']">
<td valign="top" width="$vba_style[portal_rightcolwidth]"<if condition="$show['center_column'] OR $show['left_column']"> style="padding-left: $vba_style[portal_colspacing]px"</if>>
$home[rightblocks]
</td>
</if>
</tr>
</table>
Whew! I do, however, get this error in my error.log file with groups.php all the time, whether I'm using vBa or not:
Code:
script '/ideletedmypath/groups/cron.php' not found or unable to stat
It looks like the path to /ideletedmypath/forums/cron.php gets lost somewhere.
Any ideas?
I feel like I'm close to wrapping up my initial development and this is holding me up, so any help would be appreciated.
EDIT:
invitation.php, membership.php and viewmembers.php have the same blank page output as groups.php when vBa 3.0 integration is used.
EDIT: Blank page fix for vBa 3.0 Integration
I was able to solve the problem with groups.php, invitation.php, membership.php and viewmembers.php and vBa 3.0 Integration by adding the following line into the "PRE-CACHE TEMPLATES and DATA" area near the top of each affected script:
Code:
// get special data templates from the datastore
$specialtemplates = array();
I also moved the "get special phrase groups" code to the top of that "section" so they would mirror the layout of the other working php files.
EDIT: Possible fix for PHP Fatal error: Cannot redeclare fetch_avatar_url()
I think the nested if statement is working as a fix for the php fatal error from the functions_grps.php file:
I changed this:
Code:
if (!function_exists('fetch_avatar_url') OR THIS_SCRIPT != 'groupshome')
{
... some code ...
}
to this:
Code:
if (!function_exists('fetch_avatar_url'))
{
if (THIS_SCRIPT != 'groupshome')
{
... some code ...
}
}
So far, everything seems to be working. I may have been able to change the OR to an AND to achieve a similar effect. I'm still rusty.
