![]() |
[SOLVED]Garbage text getting printed on top of every custom page
--------------------------------------------------------------------------------------------------------------------
PLEASE SCROLL DOWN AND SEE LAST REPLY Update : Here is solution! -------------------------------------------------------------------------------------------------------------------- Hello Please check screen shot below : http://img243.imageshack.us/img243/4039/sssssl.jpg I'm designing 1 mod for vb 3.7.3 and there is garbage text getting printed on top of every custom page i've designed for mod. However i've gone through every bit of code i've written, for like zillion times. But i'm not able to figure out what possibly could be causing above garbage. The thing is, i just wanna know what kinda possible conditions could cause above garbage?? like custom redirection? <if> <else> condition? etc. etc. I've followed all vbulletin API rules while coding and also double checked. So if someone evah faced above thing in life before then kindly let me know what was causing it. P.S. I know its because of my mod so please tell me something beside disabling hooks & mods (already done that).. b'cuz i'm tryin to get rid of that garbage. :( |
Very hard to tell, bad code it the issue though... without knowing what you changed its hard to tell though.
|
Quote:
here is more detailed explanation on what exactly i've coded : Lets say my file 1 contains : Quote:
Now my test.php located at test/test.php does following : Quote:
Quote:
I fixed the problem somehow but still need lil clarification! I reffered this tutorial to create my custom pages. When i removed require_once('./global.php'); from my main file, it fixed the problem. The mod seems to work fine without that file though. Can somebody tell me, will it cause any future problems? And why exactly global.php was required there? If it was for checking whether user is logged in or not then after removing global.php, my mod is still keeping non logged in users out. :confused: then why global.php was there? My file contains following code now : Code:
error_reporting(E_ALL & ~E_NOTICE); |
In test.php you are including inc.php. What is in there? I would guess one of the other files getting included somewhere in your page is including global.php already.
|
I think Lynne may be correct, IIRC this happened to be a couple months ago when i accidentally included global.php twice
|
thats gr8 help guyes!!! now i understood where i'm missing it..
I did included global.php many times!! Thanks a million again for gr8 help!!! i will fix it tomorrow morning and will let you know guyes.. thanks! :) |
Still not solved yet...
I tried everything... And now i think its not due to global.php getting called multiple times. :confused: I turned on debug mode to see what files are getting called... Here is debug information of page with garbage : http://img182.imageshack.us/img182/7580/14572635.jpg Here is debug information of page without garbage : http://img154.imageshack.us/img154/5880/52205182.jpg Why does it saying uncached template: orkut on garbage page and there is only php_sapi_name(): cgi-fcgi on page without garbage????? Is that the cause of problem? My template orkut contains following code : Code:
$stylevar[htmldoctype] My orkut.php custom page contains following code : Code:
require_once('global.php'); somebody please help me with this issue... :confused: |
Try following this article in creating your custom page - [How-To] vBulletin API Basics: Creating Custom Pages & Misc.. You have things in a different order - global called before some variables are defined. I had noticed before on my own pages that I had problems when I didn't include all the different pre-cached template groups and data arrays, even though they were empty.
|
Quote:
how do i change order in which templates are getting called?? I mean can you tell me where do i need to change exactly??? like in template? or in custom page code i've posted above? because code order in both pages i've posted above is same... I need to call my main template in vbulletin i.e. orkut rite before : # navbar # navbar_link # navbar_notifications_menubit and just after # footer thnaks a lot for noticing.... i followed API docs thread only while designing custom pages |
I'm not talking about the order of the templates, I'm talking about how you call global.php before you define some variables that are needed in global.php (like THIS_SCRIPT and error_reporting, etc.).
|
Quote:
but i can't find a way to get my "orkut" template executed just after "headinclude" :( can you tell me how do i change it?? here is what i meant : http://img269.imageshack.us/img269/4897/85275995.jpg I also tried to remove every navbar ref from my custom page php as well as template but it aint worked.. good news is, garbage is reduced.... its showing only : :o --------------- Added [DATE]1248695991[/DATE] at [TIME]1248695991[/TIME] --------------- i spent 6 hours working straight on this problem and i still can't solve it!!!!!!!! its driving me crazy!! :mad: please please help me :confused: its not showing any garbage in IE but i tried for 9 different browsers and there is garbage!!!!!!!!! DAMN! :mad: should i post it under paid request??? i know its just 1 line edit work but i still couldn't find out the solution!! how much will be the charge? |
Maybe I know what it is... Let me guess - your files are encoded in UTF-8? If yes then be aware that some text editors adds utf8 header to file - it is possible that garbage which you see in output is this header. Of course you will not see it in your text editor, because it is ok according to utf-8 format.
Just save each your file in other text editor which for sure is not adding header when saving in utf8 (i.e. in notepad2 you can choose utf8 and utf8 with signature – use it without signature). Let me know does it help :) |
hello .. first . on the template usage. this sort templates name on alphabetical order.
so all cached template on debug mode will work with your template second . u need to add your custom temp. on ($globaltemplates) before u include the global.php file to get this temp. cached. test this :- PHP Code:
|
Quote:
I just tried notepad2, Ultra Edit etc. It didn't worked.. I did exactly what you said... :o Quote:
It didn't worked.... I also tried ob_flush() etc. But nothin working.. :( |
Just quick question - are you using some template cache mod?
|
Quote:
btw i'm googling a lot for this and i found few resources : http://www.google.co.in/search?hl=en...meta=&aq=f&oq= --------------- Added [DATE]1248785203[/DATE] at [TIME]1248785203[/TIME] --------------- PROBLEM SOLVED!! posting solution for future coders ;) I opened every file in notepad and saved it with ANSI encoding!!! The problem was due to utf-8 BOM... here is link to read more about it : http://en.wikipedia.org/wiki/Byte-order_mark Thanks a million Lynne, mferguson, NLP-er, R1lover, Antivirus, Almotmaiz.Net for taking your precious time for replies... strongly appreciate that :o |
Quote:
--------------- Added [DATE]1248857339[/DATE] at [TIME]1248857339[/TIME] --------------- Quote:
So for others who need utf8 because of some special characters in their languages - it is not necessary to go to ANSI. You can stay with UTF-8 - just write each file without signature :) |
All times are GMT. The time now is 03:28 AM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|