vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   Need code for this.. please help.. (https://vborg.vbsupport.ru/showthread.php?t=288608)

shibby2 10-03-2012 11:48 PM

Yea it was a fresh copy but I edited all the info correctly. Its uploaded in the includes folder.

I really dont know whats up, everything looks fine. THeres nothing in the begining.

Heres how it starts:

<?php
/*================================================= =====================*\
|| ################################################## ################## ||
|| # vBulletin 3.8.4 Patch Level 2
|| # ---------------------------------------------------------------- # ||
|| # All PHP code in this file is �2000-2010 Jelsoft Enterprises Ltd. # ||
|| # This file may not be redistributed in whole or significant part. # ||
|| # ---------------- VBULLETIN IS NOT FREE SOFTWARE ---------------- # ||
|| # http://www.vbulletin.com | http://www.vbulletin.com/license.html # ||
|| ################################################## ################## ||
\*================================================ ======================*/

/*-------------------------------------------------------*\
| ****** NOTE REGARDING THE VARIABLES IN THIS FILE ****** |
+---------------------------------------------------------+
| If you get any errors while attempting to connect to |
| MySQL, you will need to email your webhost because we |
| cannot tell you the correct values for the variables |
| in this file. |
\*-------------------------------------------------------*/

kh99 10-03-2012 11:59 PM

Yeah, that looks right to me. Do you know if you have any kind of caching of php code going on on your server?

Another thought is that there could possibly be some invisible characters at the beginning, but I'm pretty sure that notepad is OK to use and shouldn't cause that.

Did you look at the file that's on your server to make sure it's actually getting overwritten?

shibby2 10-04-2012 12:05 AM

YEa, I looked at the file that is uploaded on the server, looks the same.

I have no idea if I have caching of php code... how can I find that out?

kh99 10-04-2012 12:12 AM

I actually don't know - we have some kind of caching set up where I have to refresh it to get changes to take effect, but we have a web page to do that so I don't know what to tell you. But if you had that then your original change shouldn't have had any effect, so that's probably not the issue. (and your host probably would have given you instructions).

How often do you upload files? I was thinking it might be a problem with ascii vs. binary mode when ftping, but if so you'd probably know it from other files having problems.

If there was some way to get me the file I'd look at it for you, but you probably don't want to post it here and you can't attach to PMs.

shibby2 10-04-2012 12:14 AM

So you would need the whole config.php file? Can I email it to you or something?

Or woudlnt i be able to just paste it in a PM?

kh99 10-04-2012 12:18 AM

You could paste it, but I'm afraid that might hide what I'd be looking for. Really it's a long shot that I'd notice something that you didn't, but I don't know what else to tell you.

I'll send you a PM.

shibby2 10-04-2012 12:39 AM

Got it working!!! :)

Wow, that was so weird, Ive never seen anything like that before. It looked fine, but wasnt. lol

I downloaded phpcoder and used that, and sure enough it showed it in there too. Removed it, saved, and reuploaded. Works now! :)

Thank you soooo much for all the help!

So do you think I should try adding that bit of code again? lol

kh99 10-04-2012 12:55 AM

Quote:

Originally Posted by shibby2 (Post 2370621)
So do you think I should try adding that bit of code again? lol

Glad you got it fixed. I don't know if you're kidding or not, but I think you should be OK as long as you use that new editor.

shibby2 10-04-2012 03:11 AM

Yea I think it'll be ok now.. but maybe I'll wait til off-peak hours this time. lol

Thanks again! :)

--------------- Added [DATE]1349325927[/DATE] at [TIME]1349325927[/TIME] ---------------

Alright, tried it again. Everything works fine with the code given. The custom avatar does show if a user has one. If he doesnt have one, it's just blank.. no avatar.

So how exactly would I get the "No Avatar" image to show for those who don't have one?

The image is:
Code:

http://www.myforum.com/forums/images/avatars/noavatar.jpg
Thanks! :)

kh99 10-04-2012 07:22 AM

Oops - that is what you were asking about originally. Try this:

Code:

<if condition="$bbuserinfo[avatarid]"><img src="$bbuserinfo[avatarpath]" alt="Your avatar" border="0" /><else /><if condition="$bbuserinfo['hascustomavatar'] AND $vboptions['avatarenabled']"><if condition="$vboptions['usefileavatar']"><img src="{$bbuserinfo[avatarurl]}/avatar{$bbuserinfo[userid]}_{$bbuserinfo[avatarrevision]}.gif"<else /><img src="image.php?{$session[sessionurl_q]}u={$bbuserinfo[userid]}&amp;dateline={$bbuserinfo[avatardateline]}"</if><if condition="$bbuserinfo['avwidth'] AND $bbuserinfo['avheight']"> width="{$bbuserinfo[avwidth]}" height="{$bbuserinfo[avheight]}"</if> alt="Your avatar" border="0" /><else /><img src="images/avatars/noavatar.jpg" alt="Your avatar" border="0" /></if></if>


All times are GMT. The time now is 09:01 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.01170 seconds
  • Memory Usage 1,742KB
  • 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
  • (2)bbcode_code_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)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