Thread: Major Additions - GRPS: Groups Commune 2.0.x
View Single Post
  #1668  
Old 06-05-2007, 05:47 PM
sabret00the's Avatar
sabret00the sabret00the is offline
 
Join Date: Jan 2003
Location: London
Posts: 5,268
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by vgevolution View Post
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.
i cut down the need for modification by renaming the function.
Reply With Quote
 
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01183 seconds
  • Memory Usage 1,792KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD_SHOWPOST
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (8)bbcode_code
  • (1)bbcode_quote
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_box
  • (1)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit_info
  • (1)postbit
  • (1)postbit_onlinestatus
  • (1)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • reputationlevel
  • showthread
Included Files:
  • ./showpost.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showpost_start
  • bbcode_fetch_tags
  • bbcode_create
  • postbit_factory
  • showpost_post
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • showpost_complete