Simple Machines Community Forum

Customizing SMF => SMF Coding Discussion => Topic started by: [Unknown] on January 12, 2005, 06:55:29 AM

Title: How do I modify files?
Post by: [Unknown] on January 12, 2005, 06:55:29 AM
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 (http://www.context.cx/), Crimson Editor (http://www.crimsoneditor.com/), and EditPad (http://www.editpadpro.com/index.html).

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]
Title: Re: How do I modify files?
Post by: loudog on March 19, 2005, 10:18:43 AM
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.
Title: Re: How do I modify files?
Post by: binary on July 14, 2005, 01:41:00 PM
thanks unknown, you have helped out a lot
Title: Re: How do I modify files?
Post by: 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... :(
Title: Re: How do I modify files?
Post by: xenovanis on September 25, 2005, 04:34:48 AM
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.
Title: Re: How do I modify files?
Post by: morningwood on October 18, 2005, 01:12:51 AM
Also I use Putty to log into my server and then use 'vi' (linux) to edit files..

Works great for me.
Title: Re: How do I modify files?
Post by: That70sHeidi on November 30, 2005, 04:55:03 PM
sorry, wrong place. but thanks anyway, this WAS helpful ;)
Title: Re: How do I modify files?
Post by: Leipe Po on November 30, 2005, 05:37:43 PM
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
Title: Re: How do I modify files?
Post by: NarrativeKnight on December 30, 2005, 10:47:49 AM
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
Title: Re: How do I modify files?
Post by: Syrinx on February 21, 2006, 12:15:55 AM
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 ConTEXT (http://www.context.cx/), Crimson Editor (http://www.crimsoneditor.com/), and EditPad (http://www.editpadpro.com/index.html).

One more to add to the list, is Notepad++ (http://notepad-plus.sourceforge.net/uk/site.htm).  This is the one that I always use, and it includes line numbers and a tabbed workspace.
Title: Re: How do I modify files?
Post by: Webrunner on February 23, 2006, 05:28:17 AM
I would like to recommend PSPAD (http://www.pspad.com). 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.
Title: Re: How do I modify files?
Post by: Mr. Khan on November 16, 2007, 08:12:50 PM
thnx
Title: Re: How do I modify files?
Post by: nick09 on November 16, 2007, 08:21:47 PM
Notepad++ (http://notepad-plus.sourceforge.net/uk/site.htm)

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. ;)
Title: Re: How do I modify files?
Post by: Antechinus on November 23, 2007, 06:26:38 AM
Quote from: Webrunner on February 23, 2006, 05:28:17 AM
I would like to recommend PSPAD (http://www.pspad.com). 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
Title: Re: How do I modify files?
Post by: depo23 on March 09, 2008, 06:38:24 AM
NotePade++
Title: Re: How do I modify files?
Post by: MF30 on July 07, 2009, 07:01:08 PM
Thanks Unknown.
Title: Re: How do I modify files?
Post by: seojoe on August 28, 2010, 02:19:11 PM
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.
Title: Re: How do I modify files?
Post by: ivan91tran on October 12, 2010, 01:04:45 PM
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.
Title: Re: How do I modify files?
Post by: impreza on October 17, 2010, 04:46:28 PM
hi  The problem with the modem bad addresses sitemap

http://www.simplemachines.org/community/index.php?topic=405232.new#new

Help
Title: Re: How do I modify files?
Post by: impreza on October 19, 2010, 06:42:15 AM
in sitemap.template.php  code - edit = work
Title: Re: How do I modify files?
Post by: Oya on October 19, 2010, 07:54:57 AM
if you have a problem with a mod please ask in the mod's support thread, you will get a bette answer there
Title: Re: How do I modify files?
Post by: harunkaraca on November 07, 2010, 04:11:41 PM
users want to download individual files Is there a setting like this?
Title: Re: How do I modify files?
Post by: xenovanis on November 08, 2010, 07:37:14 AM
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  ???
Title: Re: How do I modify files?
Post by: konkarakas on December 14, 2010, 04:39:05 PM
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... ? 
Title: Re: How do I modify files?
Post by: Foozer on February 08, 2011, 05:17:26 PM
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?
Title: Re: How do I modify files?
Post by: Ramboft on February 09, 2011, 05:27:55 AM
Hello. I've got a problem. See the following picture:

(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fimg9.imageshack.us%2Fimg9%2F9128%2Fdenemerz.jpg&hash=b555385d74d43fc1d630282f4f391b228bcd80fa)

How can I solve? Thanx.
Title: Re: How do I modify files?
Post by: Illori on February 09, 2011, 05:46:04 AM
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.
Title: Re: How do I modify files?
Post by: 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.
Title: Re: How do I modify files?
Post by: Ramboft on February 09, 2011, 06:34:17 AM
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.
Title: Re: How do I modify files?
Post by: Ramboft on February 23, 2011, 09:02:57 AM
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" .
Title: Re: How do I modify files?
Post by: amko_sa on August 15, 2011, 05:13:22 PM
Can I change google search for google adsense search in this mod?
Title: Re: How do I modify files?
Post by: Dave6 on September 13, 2011, 09:42:02 AM
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

Title: Re: How do I modify files?
Post by: IchBin™ on September 13, 2011, 04:04:08 PM
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.
Title: Re: How do I modify files?
Post by: Dave6 on September 13, 2011, 04:12:58 PM
sorry, thanks
Title: Re: How do I modify files?
Post by: abidejaz4u on September 24, 2011, 12:20:11 PM
from where i can modify the mod setting???
Title: Re: How do I modify files?
Post by: Shadowvirus on April 17, 2012, 09:31:52 AM
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 ^^
Title: Remove the text "newbielink" and "nonactive"
Post by: jrn44 on November 24, 2015, 03:12:28 AM
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..
Title: Re: How do I modify files?
Post by: Illori on November 24, 2015, 05:12:27 AM
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.