vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=252)
-   -   Object of class vB_Template could not be converted to string (https://vborg.vbsupport.ru/showthread.php?t=310861)

Wedframe 04-28-2014 01:19 PM

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!

Lynne 04-28-2014 03:25 PM

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.

vBNinja 04-28-2014 03:47 PM

What are you trying to do? Lol

Wedframe 04-28-2014 04:56 PM

1 Attachment(s)
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(((

kh99 04-28-2014 07:42 PM

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.

Wedframe 04-28-2014 08:29 PM

Unfortunately author of this mod, dont answear in threads for rfee / four years((((

kh99 04-28-2014 08:34 PM

Is it from this site? Can you tell us which one it is?

Wedframe 04-28-2014 08:47 PM

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...

Lynne 04-29-2014 01:57 AM

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.

Wedframe 04-29-2014 11:31 AM

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.


All times are GMT. The time now is 09:26 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.02946 seconds
  • Memory Usage 1,736KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_code_printable
  • (2)bbcode_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.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
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete