vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   Functions.php -- Tips? (https://vborg.vbsupport.ru/showthread.php?t=37253)

Rose 04-10-2002 01:41 PM

Functions.php -- Tips?
 
Does anyone have any tips for editing functions.php (either admin or root)?


I know this sounds silly, but EVERYTIME I go to edit this file (whether I do it online the dumb way or via EditPlus2) I seem to mess it up and get all kinds of parse codes. :s Eventually I get it working, but only after numerous frustrating attempts and lots of yelling. ;)


If I could get some hints or tips, maybe I can get the blasted file working the right way the first (or even second or third) time. *sigh*

:( I even shy away from hacks that have to touch this file. :'(


So, hints, tips? Please!!


Edited to say :o There's a forum for hints and tips! I didn't see it, but my topic doesn't seem to be in there. So if this thread goes in there, or if it's hacking discussion, do your duty. :) Sorry about that!

Rose 04-11-2002 12:56 PM

Awwww. Come on, guys! Doesn't anyone have any love for lil' ol' me?


http://www.simpsonsboard.com/forums/...lies/hippy.gif


Surely I'm not the only one that has trouble with this file, right? http://www.simpsonsboard.com/forums/.../embrassed.gif

Sparkz 04-11-2002 01:04 PM

I've never had problems with this, unless I fscked up and did a typo or whavever.

el3m3nt 04-13-2002 01:28 PM

just don't touch it :D.

Rose 04-13-2002 01:33 PM

Quote:

Originally posted by el3m3nt
just don't touch it :D.

*lol* That's hard when about half the hacks (or maybe a third) have to edit it. ;)


I do the same exact steps with this file as I do any other. Generally I don't make mistakes in the other files (not always, I'm not perfect), but I do in this one every time. :s

I tried installing the "Yesterday/Today" hack and stuffed it up pretty well. :s

Maybe - do extra lines count in the file? For instance, when I paste the hack in and I put a blank line between the end of the hack and the start of the next line - is that bad? I've tried it several ways but haven't come to a credible solution.

el3m3nt 04-13-2002 01:39 PM

no put blank lines where ever you want.. and so many you want :). you can also put some comments at the start and the end of the hack-code. so you can find the code segment easier.

for comments put at the beginning of the line '//' (doubleslash) and then write whatever you want :).

mr e 04-13-2002 08:17 PM

It shouldn't be harder than other files, but some things I miss are the closing }'s or at the end of almost every line you need a ; and make sure commented stuff stays commented.

Chris M 04-20-2002 01:25 PM

Try to make sure you dont make syntax errors, or delete any brackets ( { )...

Satan

JediKNight 05-11-2002 01:21 AM

ok, this is my experience...

If you have some type of web-based editors provide by your web host, they can mess your files up.
there are times I tried so hard to get my code working but there is still always errors.. I uploaded the original file (sure it working again) and edit it by just deleting 1 space in a commented line... and got the parse error.

I think those web-based text editor doesn't save the file in the correct ASCII format, and that causes the problem.

always try to edit the file offline with some very crude (notepad, but not MS Word or WordPad...), or very professional text/codes editors (i use UltraEdit, it's excellent)...

Jedi

Logician 05-14-2002 07:59 AM

Sorry to dissapoint you but editing functions.php (either) is no different than editing any other vbulletin file. :)

I really dont have any idea why you encountered many problems, but it's a PHP script, just like showthread.php or private.php so I can guarantee there is no curse on it.. :D

Maybe it's the program you use..Maybe switching back to good old Notepad can help..

Mr. Santa 05-16-2002 01:18 PM

I would suggest using CuteFTP Pro 2.0 if you have FTP access.
When you browse your directory, and you right click on a file and choose "edit", CuteFTP is going to download it automatically and lets you edit it. When you hit "save" it uploads the changes immediatly. Very easy, and the best thing is: it handles code files like PHP amazingly. No wrong formatting, no wrong return codes, everything is edited and saved as it should be.

Very easy option in CuteFTP...

Greetz,

Mr. Santa
-

Chris M 06-10-2002 09:46 AM

Lol...

Satan

Sketch 07-17-2002 02:20 PM

it's all php, rose....Just like any other php file. ;)

chr@nox 07-22-2002 08:35 AM

like 80% of the postbit or something is coded out in admin/functions.php
so i guess editing it is needed alot...
but i don't see why your getting probs
if you do everything as it says in the hack, and make sure u add all stuff correctly there would be no error..

Bubba 07-29-2002 03:31 PM

Quote:

Originally posted by Mr. Santa
I would suggest using CuteFTP Pro 2.0 if you have FTP access.
When you browse your directory, and you right click on a file and choose "edit", CuteFTP is going to download it automatically and lets you edit it. When you hit "save" it uploads the changes immediatly. Very easy, and the best thing is: it handles code files like PHP amazingly. No wrong formatting, no wrong return codes, everything is edited and saved as it should be.
-

Unless something's changed be very careful doing this. If you somehow lose your connection while your editing it could have very bad results.

For example, in my younger days ;), I would do this and CuteFTP would upload my files automatically when I closed WordPad (editor of choice). Well one time the FTP connection timed out without me knowing and I close WordPad to cause the upload, and got unexpected results. It caused me to lose the entire file because of the way it handled the server-side of things while I was editing the file.

I highly recommend just downloading the file, making your changes, and then re-uploading it. There are a bunch of syntax-highlighting editors available so be safe and edit files off-line.

proxyMX 07-30-2002 03:26 AM

FTP program: Smart FTP
Editiing Program: Dreamweaver MX

Rose, me hopes your as hot as your avatar, she looks like sharon docherty

Boofo 08-10-2002 08:04 AM

Rose, the only program you need for both FTP and an editing program is EditPlus 2. It can not be beat. ;) Ask Chen.

Quote:

Originally posted by proxyMX
FTP program: Smart FTP
Editiing Program: Dreamweaver MX

Rose, me hopes your as hot as your avatar, she looks like sharon docherty


JJR512 08-11-2002 01:56 AM

Why are there two functions.php files mentioned? "Does anyone have any tips for editing functions.php (either admin or root)?" There's no functions.php in the root of my vBulletin. :confused:

What I use to edit files is good ol' Notepad. It's free (it comes with Windows). It's a small, simple program. In Windows 2000 or XP, it's a lot better than in other versions, because it recognizes more keyboard shortcuts, like Ctrl-F to find, which is a big help. It doesn't do any fancy highlighting or anything, which I guess I don't need, since I've gotten along just fine without it for all this time. :)

For FTPing, I use WS_FTP Pro. I like the way the newer versions automatically reconnect if you try to do something after the connection has timed out. I also like the new Transfer Manager window, which lets you start a transfer, then change to a different directory and start another transfer, while the first one is still going. They get queued. The newer versions are a lot nicer than the older ones.

Rose 08-13-2002 07:51 PM

*hehe* I forgot this thread was still around.


Thank you, all, for the tips and hints and "not cursed". ;) I still believe it is, but - fortunately, I seem to have come to terms with functions.php and don't have as much problems with it. But if I happen to mess up the forum - you can bet it's because I touched that file! I guess it's just my magical touch. ;)




Boofo - I used EditPlus2 and absolutely LOVE it!

ProxyMX - I used SmartFTP - it's the easiest ftp I've found so far. And I'll tell you I'm as hot as my av, since you won't know otherwise. ;) The av is Holly Marie Combs - also known as "Piper" on the WB's show Charmed. She's a babe! For more pics, visit my forum. ;) (Shannen Doherty also starred on the show, and pics can be found there!)

JJR - I probably mentioned two different files because I wasn't paying attention. This thread was started several months ago and I seem to have wisened up since then. If 'wisened' is a word, of course.

Boofo 09-03-2002 12:27 PM

Rose, another great program for FTPing is Windows Commander. It's a great Windows Explorer replacement and does FTP excellently, too. It's a lot like the old Norton Commander was in the old days.

Quote:

Originally posted by Rose
*hehe* I forgot this thread was still around.

Boofo - I used EditPlus2 and absolutely LOVE it!


::nox|silicon:: 09-11-2002 10:49 PM

rose, it would help if you could give some details on which kind'a "parse codes" you get...

i.e.: if it's something like "error parsing header, header information already started in xxx" the solution is VERY simple, because this would just mean, that you have a carriage-return after your ending-php tag (the ?> at the very end of the document)

cheers,
nox


All times are GMT. The time now is 05:02 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
  • Page Generation 0.01040 seconds
  • Memory Usage 1,781KB
  • 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
  • (4)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (21)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