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

Reply
 
Thread Tools Display Modes
  #1  
Old 04-28-2014, 02:19 PM
Wedframe Wedframe is offline
 
Join Date: Mar 2013
Posts: 48
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Object of class vB_Template could not be converted to string

Hi. Please help me with modification of plugin. This plugin work perfectly on the default style, but on installed custom style his generate php-errores:
Code:
Object of class vB_Template could not be converted to string....
strpos() expects parameter 1 to be string, object given...
Ofcause after this the page not loading....
I found hook and localized code what gives this errores. Its in parse_template
PHP Code:
if ($vbulletin->options['legacypostbit'] AND isset($vbulletin->templatecache['postbit_legacy']) AND is_member_of($vbulletin->userinfounserialize($vbulletin->options['mkp_self_moderation_group'])))
        {
            
$template =& $vbulletin->templatecache['postbit_legacy'];
        } 
If I comment action of statement "if"
PHP Code:
if ($vbulletin->options['legacypostbit'] AND isset($vbulletin->templatecache['postbit_legacy']) AND is_member_of($vbulletin->userinfounserialize($vbulletin->options['mkp_self_moderation_group'])))
        {
            
//$template =& $vbulletin->templatecache['postbit_legacy'];
        

then page load without errores, but plugin not work correctly.
Thanks for any help!
Reply With Quote
  #2  
Old 04-28-2014, 04:25 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

So, if you comment out the line regarding the postbit_legacy template, it works fine. So, compare your postbit_legacy from your custom style to the one in the default style.
Reply With Quote
Благодарность от:
Wedframe
  #3  
Old 04-28-2014, 04:47 PM
vBNinja's Avatar
vBNinja vBNinja is offline
 
Join Date: May 2011
Location: USA
Posts: 239
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

What are you trying to do? Lol
Reply With Quote
  #4  
Old 04-28-2014, 05:56 PM
Wedframe Wedframe is offline
 
Join Date: Mar 2013
Posts: 48
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks Lynne! Yes they have a difference. I attached txt file with whole postbit_legacy template from custom style. May be if you look at them, you`ll can say something? Ofcause if its not so hard for you :erm:
vBNinja, its not my mod. I`m just use it. But with new style his stop working. Its mod for self moderation in threads, for user-topicstarters. In this hook, to forward, creats new buttons under postbits, for what users(edit/soft delete posts in his own threads).

Sorry for my english(((
Attached Files
File Type: txt postbit_legacy.txt (13.0 KB, 5 views)
Reply With Quote
  #5  
Old 04-28-2014, 08:42 PM
kh99 kh99 is offline
 
Join Date: Aug 2009
Location: Maine
Posts: 13,185
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Where did you get the mod? You might have better luck asking the person who wrote it.

I'm thinking maybe the code in the plugin is modifying the cached template, but with the custom style, the result is a template that causes that error when eval()ed.
Reply With Quote
  #6  
Old 04-28-2014, 09:29 PM
Wedframe Wedframe is offline
 
Join Date: Mar 2013
Posts: 48
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Unfortunately author of this mod, dont answear in threads for rfee / four years((((
Reply With Quote
  #7  
Old 04-28-2014, 09:34 PM
kh99 kh99 is offline
 
Join Date: Aug 2009
Location: Maine
Posts: 13,185
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Is it from this site? Can you tell us which one it is?
Reply With Quote
  #8  
Old 04-28-2014, 09:47 PM
Wedframe Wedframe is offline
 
Join Date: Mar 2013
Posts: 48
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

No. Is it not from here...
Its here:
http://vbsupport.org/forum/showthread.php?t=40628
----------
I think I can share this mode on vbulletin.org. This is nice mod, what can be very useful in some forums... But, how can we see, its have one bug...
Reply With Quote
  #9  
Old 04-29-2014, 02:57 AM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I'm sorry, but we don't know the mod so we don't know what the issue is. You either need to try things yourself or find someone willing to spend the time to figure it out for you.
Reply With Quote
  #10  
Old 04-29-2014, 12:31 PM
Wedframe Wedframe is offline
 
Join Date: Mar 2013
Posts: 48
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Ok. Its saaaad((( I was hoping for help ...
In any case, I added the archive with the module, just in case someone nevertheless wants to fix it. Just remind,.. on the default style, this mod work without any problems, and you can use it on yours forums.
Reply With Quote
Reply


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 08:00 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.06327 seconds
  • Memory Usage 2,280KB
  • Queries Executed 12 (?)
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
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (1)bbcode_code
  • (2)bbcode_php
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (10)post_thanks_box
  • (1)post_thanks_box_bit
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit
  • (10)post_thanks_postbit_info
  • (10)postbit
  • (1)postbit_attachment
  • (10)postbit_onlinestatus
  • (10)postbit_wrapper
  • (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_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • 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
  • 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
  • fetch_musername
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • post_thanks_function_fetch_thanks_bit_start
  • post_thanks_function_show_thanks_date_start
  • post_thanks_function_show_thanks_date_end
  • post_thanks_function_fetch_thanks_bit_end
  • post_thanks_function_fetch_post_thanks_template_start
  • post_thanks_function_fetch_post_thanks_template_end
  • postbit_attachment
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete