Go Back   vb.org Archive > vBulletin 4 Discussion > vB4 General Discussions
FAQ Community Calendar Today's Posts Search

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 03-24-2010, 12:16 AM
Thr33's Avatar
Thr33 Thr33 is offline
 
Join Date: Sep 2008
Location: Manchester, UK
Posts: 114
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Thread Reply Problem.. HELP!

Hey guys ive been having this problem for a couple of weeks and ive looked into it and still i can amend it. Please can anyone help me see whats erroring here and why.

The enclosed screenshot happens when i post a reply in the shares section. Now the shares section has had a little modding with MARCO's Hide BBCode, plus my own postbit editing and reputation system PHP mod.

The error is:
(header)
Warning: Cannot use a scalar value as an array in [path]/includes/class_postbit.php(314) : eval()'d code on line 122
- which is odd because there is no data on like 122

(VBulletin Message)
Unable to add cookies, header already sent.
File: /home/lazyreco/public_html/network/includes/class_core.php
Line: 4372
- which is just the error script

As mentioned i have modded the postbit_legacy (to better allign/display the postbit stats) & the functions_newpost.php (to enable a custom built reputation system for share ratio purposes)

(postbit_legacy)
PHP Code:
<vb:if condition="$show['reputation']"><dt>Reputation</dt> <dd>{vb:raw post.reputation} <class="popupctrl reputation" title="{vb:rawphrase reputation}" href="reputation.php?{vb:raw session.sessionurl}do=addreputation&amp;p={vb:raw post.postid}" rel="nofollow" id="reputation_{vb:raw post.postid}"><img src="http://lazyrecords.net/network/images/rep-plu.gif" alt="{vb:rawphrase reputation}" /></a></dd></vb:if> 
- added under usertitle & rank

(functions_newpost.php)
PHP Code:
if ($foruminfo[forumid]>AND $foruminfo[forumid]<OR $foruminfo[forumid]==10 OR $foruminfo[forumid]==11)
{
    if (
$type == 'thread')
    {
    
$result $vbulletin->db->query_first("SELECT reputation FROM user WHERE userid =".$vbulletin->userinfo['userid']." ORDER BY userid ASC");
    
$punkty=$result['reputation']+1;
    
$vbulletin->db->query_write("UPDATE user SET reputation=".$punkty." WHERE userid=".$vbulletin->userinfo['userid']);
    
$senderpermissions=0;
    
$registry =& $vbulletin;
    }
    if (
$type == 'reply')
    {
    
$result $vbulletin->db->query_first("SELECT reputation FROM user WHERE userid =".$vbulletin->userinfo['userid']." ORDER BY userid ASC");
    
$punkty=$result['reputation']-1;
    
$vbulletin->db->query_write("UPDATE user SET reputation=".$punkty." WHERE userid=".$vbulletin->userinfo['userid']);
    
$senderpermissions=0;
    
$registry =& $vbulletin;
    }

- added after

PHP Code:
                    eval(print_standard_redirect('redirect_duplicatepost'truetrue));
                }
            }
        }
    } 
Can anyone help in seeing where ive made a mistake or how to correct it?? Ive uploaded all files mentioned incase you need a deeper look into it. Thanks in advance.
Attached Images
File Type: jpg pageERROR.jpg (80.4 KB, 0 views)
Attached Files
File Type: php functions_newpost.php (49.2 KB, 1 views)
File Type: php class_postbit.php (37.2 KB, 1 views)
File Type: php class_core.php (115.1 KB, 1 views)
Reply With Quote
 


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 09:45 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.03292 seconds
  • Memory Usage 2,318KB
  • Queries Executed 13 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (3)bbcode_php
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)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
  • (4)postbit_attachment
  • (1)postbit_onlinestatus
  • (1)postbit_wrapper
  • (1)showthread_list
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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_threadedmode.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids_threaded
  • showthread_threaded_construct_link
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • 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_attachment
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete