How do I modify files?

Started by [Unknown], January 12, 2005, 06:55:29 AM

Previous topic - Next topic

[Unknown]

If you've been linked to this topic, you've probably asked if something can be changed, found a bug, or are being presented with a small tweak.

What follows should be a list of files to open, what to look for, and what to add or replace to what you find.  To do this, you'll need a text editor of some sort.  Notepad will work, but won't give you line numbers and a few other things - other editors include ConTEXT, Crimson Editor, and EditPad.

Once you have a text editor, you'll need to get to the files.  This means using FTP to download the file in question, opening it with whatever text editor you wish to use, making the changes, and then uploading it again.

Sometimes, we may leave off common paths to files.  Here's a list of some of them:
  - Admin.php, QueryString.php, etc. (files ending in .php) are usually in Sources/.
  - Something.template.php or similar is usually found in your theme's directory - for example, Themes/converted or Themes/yourtheme.  However, it's usually a bad idea to modify the default theme... instead, you should make a copy of the file and then upload the modified file to that folder.
  - Something.english.php (or any other language) should be in Themes/default/languages.

As to the changes themselves, usually they will be either "find" and "replace" (meaning, find a block of code and replace it with another block..) or "find" and add above/below/after/before.  In the latter case, you should just add the code block to said position relative to the code to find, on a separate line.  For example, if someone said you should find:

Line 1

And add after that line:

Line 2

The result should be two separate lines, like so:

Line 1
Line 2


If you're not comfortable with modifying files directly, you may wish to ask someone to do it for you, or request a package be made for use with the package manager.  Often such things take much more time, however.

Importantly, whenever modifying files, always - and I do mean always - make backups.  You don't know what could cause problems with your forum and, as much as you might want a change, your forum at least working would probably be better than no forum at all.

-[Unknown]

loudog

Thanks Unknown :). What I've been doing, is saving them as HTML, then opening them in FP. Then when I'm done, I save it via php. I'll look at these other programs as an alternative.

binary

thanks unknown, you have helped out a lot


Not even in /Dev/Null/ no one can hear u scream.Join Net-force For all your Security Needs, click here to enter

David_Q

Ok, but will this action solve my problem upgrading to PHP 4.4.0 or what? I have followed above mentioned tips and the forum seems to run fine but i cant upgrade to PHP 4.4.0... :(

xenovanis

Quote from: David_Q on September 25, 2005, 04:10:57 AM
Ok, but will this action solve my problem upgrading to PHP 4.4.0 or what? I have followed above mentioned tips and the forum seems to run fine but i cant upgrade to PHP 4.4.0... :(

David Q,

This is just a link to give you some advise on how to modify files. What you need to do is:

http://www.simplemachines.org/community/index.php?topic=50478.0

So your forum will run with PHP 4.4.0.
"Insanity: doing the same thing over and over again and expecting different results."

morningwood

Also I use Putty to log into my server and then use 'vi' (linux) to edit files..

Works great for me.

That70sHeidi

sorry, wrong place. but thanks anyway, this WAS helpful ;)

Leipe Po

QuoteImportantly, whenever modifying files, always - and I do mean always - make backups.  You don't know what could cause problems with your forum and, as much as you might want a change, your forum at least working would probably be better than no forum at all.

*does that also apply to me?*  :P

http://www.phpscripters.net  :o
There is only one thing more importend to me then coding:
My Girlfriend

Microsoft - "You've got questions.  We've got dancing paperclips."

NarrativeKnight

I have never had a board at all before in my life.  Where are the files at that I want to modify for doing the upgrade that makes my board compatible with 4.4.0 and if I am directly modifying them then why do I need to upload changes?  Do I need to upload changes and if so how?

Timothy

Syrinx

Quote from: [Unknown] on January 12, 2005, 06:55:29 AM
What follows should be a list of files to open, what to look for, and what to add or replace to what you find.  To do this, you'll need a text editor of some sort.  Notepad will work, but won't give you line numbers and a few other things - other editors include hxxp:www.context.cx/ [nonactive], hxxp:www.crimsoneditor.com/ [nonactive], and hxxp:www.editpadpro.com/index.html [nonactive].

One more to add to the list, is hxxp:notepad-plus.sourceforge.net/uk/site.htm [nonactive].  This is the one that I always use, and it includes line numbers and a tabbed workspace.

Webrunner

I would like to recommend PSPAD. Of all the hundreds of editors i have tried this is by far the best one. It has loads of handy tools and features, is fast and most important, completely free!

Give it a try!

BTW. i am in no way related to this programm.
There is a difference between knowing the path and walking the path.

=========================================
Vrouwen Power! | Sprintweb: No nonsense e-Business consultancy

Mr. Khan




nick09

Notepad++

is the best program i have seen so far

you can test your files on a browser.

many different coding languages including XML.

you should try it. ;)

Antechinus

#13
Quote from: Webrunner on February 23, 2006, 05:28:17 AM
I would like to recommend PSPAD. Of all the hundreds of editors i have tried this is by far the best one. It has loads of handy tools and features, is fast and most important, completely free!

Give it a try!

BTW. i am in no way related to this programm.
Ok, sounds good but for a beginner would it have so many functions a to be confusing?
Would something simpler be easier to use, or is the operating system easy to get the hang of for basics?

ETA: Ok, I bit the bullet and installed it. Now I just have to learn how to use it.
Should be more fun than a barrel of monkeys. Expect more stoopid questions.  :D

depo23


MF30


seojoe

can this mod be made to prevent posts by a certain user with links? for example, i have rss feeder. i would like to create a user that is strickly used to post the rss feeds but block any posts that have urls in them in order to prevent ads on my forum. basically i am trying to have auto content generation with auto advertising/link posting prevention as well. doesnt seem to be a mod that does this and since i am not a programmer i am trying to find mods that could achieve thisby using the multiple mod functions together. please advise.

ivan91tran

Thanks that was very helpful. I followed your exact instructions, but I couldn't get it right initially. I was using Text editor on my mac (which is far better than notepad in my opinion), but I then realized I had the 'rich text' option enabled :(, so there was a whole load of background code that messed everything up! I could have just gone back to plain text, but I decided to use EditPad as the OP suggested. Worked like a charm, thanks a lot.

impreza

Portal Totemat - artykuły i filmy - treści w postaci artykułów i filmów.

impreza

in sitemap.template.php  code - edit = work
Portal Totemat - artykuły i filmy - treści w postaci artykułów i filmów.

Oya

if you have a problem with a mod please ask in the mod's support thread, you will get a bette answer there

harunkaraca

users want to download individual files Is there a setting like this?

xenovanis

Quote from: harunkaraca on November 07, 2010, 04:11:41 PM
users want to download individual files Is there a setting like this?

I'm not sure I understand your question in relation to this topic  ???
"Insanity: doing the same thing over and over again and expecting different results."

konkarakas

Hi, i just install the mod and had a look around with it... It is exactly what i wanted, though i am having a problem...

I am using smf2.rc4 UTF-8  installation and it doesnt allow me to use other characters. to be more exact when i am typing the descriptions and categories names in the native language i am getting question marks (??? ??????? ????????? ???? ?????? ??? ??????? ??????)

Any idea how to deal with it... ? 

Foozer

Hey guys, I just installed this neat little mod "Global Headers and Footers" and I have to say that it has saved me a ton of work and is very simple and easy to use! However, I do have one little problem with it... the headers and footers seem to show up the help, search, admin and my messages pages, which the headers and footers I'm using are a too wide for and it ends up messing up the whole alignment of the forum.

Is there a way that I can change it so that the headers and footers only show up in the actual forum posts and not all the other pages?

Ramboft

Hello. I've got a problem. See the following picture:



How can I solve? Thanx.

Illori

please open a separate topic for your issue, also please tell us what you think is wrong with the image, it looks fine to me other then it is in another language.

Arantor

Looks like you installed a mod to change the style and it doesn't work in your theme so ask the mod's author about it.

Ramboft

Quote from: Arantor on February 09, 2011, 06:18:30 AM
Looks like you installed a mod to change the style and it doesn't work in your theme so ask the mod's author about it.

Okey.

Ramboft

I solved my problem myself. I changed one code.

In the my theme folder > css > index.css, i found this code:

/* SMF Modders; Enhanced Side Menus */
.esm_cat_bar
{
height: 28px;


And "height" value set to: "10px" .

amko_sa

Can I change google search for google adsense search in this mod?

Dave6

Is there anyone who knows how to fix this kind of error I am getting with the RSS feed poster mod v 3.0.2 my forum is using smf 1.1.14


Error 500 - Internal Server Error

The server encountered an unexpected condition which prevented it from fulfilling the request.

Requested URL: http://www.star-trekfan.com/cronrss.php


IchBin™

Dave6, you need to seek help from the author of the mod you are having a problem with. This topic is totally unrelated to your issue. Thanks.
IchBin™        TinyPortal

Dave6


abidejaz4u

from where i can modify the mod setting???

Shadowvirus

Hej.
I want to include articles out of a spezial categorie in blocks on my website.
Blog A - all Article starting with letter A
Blog B - all Article starting with letter B
...

Can someone help my?

I hope you unterstand wat I try to say, my english isn't the best ^^

jrn44

Very old topic, but I try anyway?
I have installed anti-spam links mods and need help how to remove the text that are placed before and after a URL,
The text "newbielink" and "nonactive" I only want to have a clean URL link is not clickable?
Grateful for help.

Jan..

Illori

please stop posting in multiple topics or making multiple topics on this issue. you have been told to post in the mods support topic and that is where you are REQUIRED to post to get your issue solved.

Advertisement: