smf and tiny portal header - Posted In General Discussion...


Welcome, Guest. Please login or register.
Username:   Password:

Hosted in the Cloud RSS

Recent Topics

Gallery Latest


26 Views
0 comment(s)

32 Views
0 comment(s)


140 Views
0 comment(s)

139 Views
0 comment(s)


378 Views
0 comment(s)

347 Views
0 comment(s)

Search The Gallery

User Info

Welcome, Guest. Please login or register.
December 12, 2018, 16:20:32 PM

Login with username, password and session length

Forum
Web
Gallery

   

DatahopaForumGeneral CategoryGeneral Discussionsmf and tiny portal header



Pages: [1]

smf and tiny portal header

Viewing: 0 Members and 1 Guest       Total Views: 3110

Offline sybershot Topic starter
United States WWW Posts: 1429
Rank: Certified

I'm hoping sometime this week or next to start changing the header, within smf and tiny portal.
I have a couple question though before I begin.

to change the header throughout smf and tiny portal, do I only have to make the change to the index.php?
also I want to change the word home to blog, within the headers menu, pretty much same question, do I only have to make the change within index.php?

I also tried to change the root folders name from forum to portal, but that through an error. It was a while ago when I tried, and Sorry did not mark down the error.
 I would like to change the name of the folder from forum to portal or something similar, seeing that the home page is actually a blog not a forum. However I don't want to have to reinstall in-order to do this. Any suggestions I could try to accomplish this?

Posted May 09, 2012, 21:15:11 PM Logged

Offline Freddy
United Kingdom WWW Administrator
Posts: 3494
Rank: Certified

You don't really want to be changing index.php if you mean the one in the forum root, the one that holds settings and such like.

Also you don't want to edit the default theme, because if bad goes to worse, then at least you would still be able to run the forum in some state.

If you want to customise it, then you should be looking at making a copy of the default theme and edit that.

The headers and such are in a theme's index.template.php file.

Quote
I also tried to change the root folders name from forum to portal

Yes that will screw things up because all the path names will be wrong.

Here's a tool that may help, though I have not done it myself for this particular problem.

http://wiki.simplemachines.org/smf/Repair_settings.php

Try changing the folder name again and then drop that in the root (next to index.php in other words).

Then navigate to the repair_settings.php and you should be able to work out what to do from there.

At this stage, since you are really only beginning, it's probably just as easy to reinstall to the folder name you actually want it in.

TinyPortal needs no editing in itself; it will just use the templates of whatever theme you have selected to use.
Posted May 09, 2012, 21:35:40 PM Logged

Offline Freddy
United Kingdom WWW Administrator
Posts: 3494
Rank: Certified

Just a little more info on creating your new theme, which will start out as a copy of the default...

You need to navigate like this :

admin->configuration->Themes and Layout

Scroll down and you will see something like this attached image.

Just drop the name of your new theme in there and hit install.

Then look in your forum folder and navigate to themes, you should then see a new folder/theme in there which you can alter to your hearts content.


newtheme.jpg
smf and tiny portal header
* newtheme.jpg (44.09 KB, 574x214 - viewed 258 times.)
Posted May 09, 2012, 21:47:18 PM Logged

Offline Freddy
United Kingdom WWW Administrator
Posts: 3494
Rank: Certified

Quote
also I want to change the word home to blog

Sorry missed that part.  Yes this is pretty easy.  SMF uses a system of text strings that are defined in a separate file to the main template.  It's just a matter of finding the entry for 'home' to 'blog'.  I'll catch up with you on that, you have enough to do already Smiley
Posted May 09, 2012, 21:54:13 PM Logged

Offline sybershot Topic starter
United States WWW Posts: 1429
Rank: Certified

Thanks Freddy for the wisdom, I was just going to mod the original theme. I'll heed your warning and make a theme from the original.
True I could start over, but I am not that familiar with phpmyadmin to re-install the database. I don't want to loose the posts placed within my forum by others. I guess I could live with the url as is, for I tried fix it tools in the past and if it messes up there is usually no way to revert back leaving only option to re-install.   << sorry for the run on sentence.
Quote
Sorry missed that part.  Yes this is pretty easy.  SMF uses a system of text strings that are defined in a separate file to the main template.  It's just a matter of finding the entry for 'home' to 'blog'.  I'll catch up with you on that, you have enough to do already Smiley
No rush as I'm not sure if I can start this week or not. I probably will not be able to start till next week by the looks of things.
I have a pretty good idea of how I want the forum to look, I think it is going to be a daunting task though. To give a bit of insight of what I want to create is to use as little boxed content as possible, meaning no borders on all four sides. I would like to create an open type look. It will be a very fun project Cheesy
Posted May 09, 2012, 22:49:51 PM Logged

Offline Freddy
United Kingdom WWW Administrator
Posts: 3494
Rank: Certified

No problem, Data and me have a lot of experience with this set up so I think I can speak for him in saying - just ask.

Since you have some posts already, there is another option for you.  Install a second SMF to the folder of your choice.  Then export the existing forum database either in phpmyadmin (I prefer that) or from the SMF admin section.  Then wipe the database on this second/new forum and import the one you just saved.

And then use the repair_settings on the 'new' forum to finish things up.

When you export you would have to make sure you export data and structure.

Can get messy though, but there's nothing to lose really as if it didn't work then it's oh well you tried, not Oh my God what have I done.

But if you are new to phpmyadmin then you would probably settle for what you have.
Posted May 09, 2012, 23:09:15 PM Logged

Offline sybershot Topic starter
United States WWW Posts: 1429
Rank: Certified

That's a very ingenious way to go about it  thumbsup thumbsup I might just have to give that a try Cheesy
Posted May 09, 2012, 23:21:18 PM Logged

Online Data
United Kingdom Administrator
Posts: 5293
Rank: Certified

To be fair I think Freddy is much more knowledgeable about this topic than I am, but if I can help at any time I will jump in.

Glad to see you haven’t given up on SMF Syber.
Posted May 09, 2012, 23:39:53 PM Logged

Offline sybershot Topic starter
United States WWW Posts: 1429
Rank: Certified

I have not given up, I think I was just overwhelmed the day I posted I was going to get rid of it. I also did not have a clear insight of how the total website was going to be. Still not clear atm either  Tongue I do have a couple Ideas up my sleeve, I have just have to fully think things through.



Posted May 10, 2012, 14:05:30 PM Logged

Offline Freddy
United Kingdom WWW Administrator
Posts: 3494
Rank: Certified

Yes it all takes a lot of thought  Shocked

Going back to the 'home' button.

Assuming we want to proceed the non destructive way, and that my memory is working today, here is what you need to do.

1. Look in the Themes directory and then find the file at default->languages->index.english.php

The index.english.php holds a lot of the strings, but mainly it's where the one we are interested in lives.

2. Make a copy of index.english.php and drop it on your desktop or somewhere.

3. Open up this copy and scroll down to around line 92, or search the file for 'home'.

4. This is the line in question :

$txt['home'] = 'Home';

5. Pretty obviously you just need to redefine that how you want...blog I think it was...

$txt['home'] = 'Blog';

6. OK so now you have a customised language file and this needs to live in the new theme you will be customising.  Therefore find your new theme directory and I think there should be a 'languages' folder all ready for it - if not just make one (same directory structure as default).  Drop the new php language file in there and it will override the one that will still be in the default theme.

Note that this is basically the way to work when ever you want to override something in the default theme.  If SMF finds a file in your selected theme it will use that in preference to the matching file name in the default theme.  This saves a lot of effort because you only have to code things that are new.

That's the best way to go about it.  This way you will always know that any of your modifications will only be in your custom theme.
Posted May 10, 2012, 14:21:18 PM Logged

Offline sybershot Topic starter
United States WWW Posts: 1429
Rank: Certified

Thanks again Freddy  thumbsup thumbsup

Quote
Note that this is basically the way to work when ever you want to override something in the default theme.  If SMF finds a file in your selected theme it will use that in preference to the matching file name in the default theme.  This saves a lot of effort because you only have to code things that are new.

That's sweet, It also takes a load of my fingers, The last forum I Themed I had to make changes to every file. took over 2 months of hard labor. my fingers still feel the pain from all the typing  Tongue
Posted May 10, 2012, 16:12:44 PM Logged
General Discussion
Topic Pages: [1]
Jump to:  

Site Activity
Most Online Today: 172
130 Guests, 2 Users
Data, DataBot

fast-registration