vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=252)
-   -   Error in integrating External PHP File having Graph (Images generated by PHP code) (https://vborg.vbsupport.ru/showthread.php?t=268366)

boffin_adi 08-11-2011 10:10 AM

Error in integrating External PHP File having Graph (Images generated by PHP code)
 
hi all,

i was trying to play around with vbquiz (free version from DBTech).

I am trying to integrate a external php file which is having a graph(piechart). i am including this external php page by creating a plugin with code

ob_start();
require_once('LOCATION OF EXTERNAL FILE');
$php_include = ob_get_contents();
ob_end_clean();
vB_Template::preRegister('TEMPLATE YOU ARE USING',array('php_include' => $php_include));

and then adding the variable in the template with this code at required space.

{vb:raw php_include}

but it is giving error like this:

?PNG  ��� IHDR��?��?���??& ���PLTE?????????ddd���??̀????????*v?m��?IDATx?? ?M??8F? ??t?H?9??Yպv?B??1???a2+eCY??E?B?̇ H?SB!?B!?B!?B!???攚??|)??]6\?,?????׫?U?}?eCs?q??????GT??<?; 羧?i?:?????<?4??5?V??t?乼߱?I??[}?4c??%?Ay8?s????.զ?ӱ?٪i.ߣO????v}3?????r??L} ??iS??<emգOG???C?SJ??<?"_????}?6?j?][5?????)?I ??x?6 DN z3???׬?|x??´!??ʤ!??,? ??7'?<?9?҂>ޱ??o?|???r?4???w�?)?�B!?B!?B! ?v??#?{ǰ???????Q줶+???DŽ??G ?nt?M{ͯ???Eަ =????^??_?^???Eͯ?Q-?@=?9??`D@???,?v?h?En???@??t???Jn???@??t??? Jn???@??t???Jn???@??t???Jn???@??t????j??U?? ??n?x?y>??,-???^???_57 W?? {?#?}XZP??m??y0"?Aw{t????y0"?Aw{t????y0"?Aw{ t????y0"?Aw{t????y0"?Aw{t????a&U?~??9Ո??? ??<????<+K ??]~?^??<???,-�??<? ?????\??<? ?????\????+??ՔIs{?A?m???5???6????΃a?z?6????΃ a?z?6????΃a?z?6????΃a??'????T%?????m o M??? ????[?????`?_?_??????^'z+~??:?????2mJ?m????2mJ? m????2mJ?m????2mJ?m????2mJ?m????2mJ?m? ???2mJ?m????2mJ?m???<�??W^???�??>,-?}?i+ri??ﯿn??^'??k:^?=??]P2??<&? ?iS?o??<&? ?iS?o??<&? ?iS?o??<&? ?iS?o?b|E?wFZ? ?:? ?:? ??????n? ?|??????)?"??%??^ o????P???.??枊>?+8??> t?At?At?At?At?At?A?,??Ή????n?}:????? ?t??~?҂????כ_?~??? ׈?\?*D:? ?:? ?:? ?:? ?:? ?:? ?^?=W?>?;Չ??$?B?ei?'t??n??^!:K @t?At?A?%? ?:? ?:? ?:?/?^?D[/?G??m?x~??^?z?>??3|?? t?At?At?w?t?At?At?A??????ƚ???f?j?,??^ a?????k^P?@t?At?A}wJ?At?At?At?_???FVU ??o[>??O/'3?[?η??/????4W???t?Rz{7????????p?????v?A?,??[?w?*?m??.?T??? Y(q?eM????>? w?B?sϛ?Ҍ???N?e?ۂmʝ$c?@o?P?C3?6?D?`?^t??9 U?=?˔?????j?3??)?d??n?s֚??b??????5??z:o?G?^? '?,҇?+?$???�}I??TM??e6e?k??0x?!?WnV?o?A?l?lnn ?!??B= ]&?D?????mv?M???E^?EUu??sݜ?????6Ѷ<???hn???&??h N9?5?m?2?7?9+W?MZtJ/?0?Y???o_V??????e?1???x]??s??<???b?3??1?c?|FT?9???4_y?cTaH?A?+uˏ??im ɞ??<???B ?;?~???Ѿ#o??\?X???m?????=Iv??y?Y???+??f??Jyy ??Vs???β???G??goсd??{=ņ??Z ר?]+??u???????~??\??`?zd?^?Z4w?����IEND?B`?


it may be possible due to external php file which i am trying to integrate in vbulletin is having graph(image) generated trrough php code.

please help me out.

thanks in advance.........

kh99 08-11-2011 11:10 AM

Yes, it looks like you're trying to insert an image file in the middle of your html. What happens if you do this instead?

Code:

$php_include = '<img src="'LOCATION OF EXTERNAL FILE">';
vB_Template:PreRegister('TEMPLATE YOU ARE USING',array('php_include' => $php_include));


or even just put that html directly into the template?


All times are GMT. The time now is 01:13 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.01203 seconds
  • Memory Usage 1,715KB
  • 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
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (2)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
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete