Simple Machines Community Forum

SMF Support => SMF 2.0.x Support => Topic started by: Big Gee on October 24, 2013, 11:56:15 AM

Title: Editing the word 'Newbie' etc.
Post by: Big Gee on October 24, 2013, 11:56:15 AM
Hi All!

I've just installed a SMF forum on my gardening site. However, instead of the labels like 'Newbie' etc, being displayed against member user-names I would like to change the wording to something more appropriate for the members on the forum.

I guess I'll need to do some php file editing - that's no problem, but being new to this platform I'm not familiar with which files I need to edit.

Any pointers please?

Thanks,

G.
Title: Re: Editing the word 'Newbie' etc.
Post by: Arantor on October 24, 2013, 12:28:21 PM
Admin > Members > Membergroups

You can edit the names of the groups in there.
Title: Re: Editing the word 'Newbie' etc.
Post by: kat on October 24, 2013, 12:37:45 PM
Just for information...

If you want to change the text for other things, take a look at the file index.english.php in the default theme's "languages" directory. ;)
Title: Re: Editing the word 'Newbie' etc.
Post by: Big Gee on October 24, 2013, 02:05:45 PM
Thank you very much Arantor & K@.

Between you I think you've put me on the right road & cleared up everything I wanted to know. I'd been looking under in the wrong theme folder for a 'language' php file to edit - DOH!

Much appreciated!

G.
Title: Re: Editing the word 'Newbie' etc.
Post by: kat on October 24, 2013, 04:29:52 PM
Any time! :)
Title: Re: Editing the word 'Newbie' etc.
Post by: Big Gee on October 24, 2013, 06:13:14 PM
Great. Now whilst the topic is open (sorry to be an opportunist) - how can I insert a link into the header graphic to link back to the main site?

Here's the URL for the forum site - you'll see what graphic I'm referring to. :

http://gardenerschat-shed.net/forum

Thanks again!

G.
Title: Re: Editing the word 'Newbie' etc.
Post by: Kindred on October 24, 2013, 08:31:02 PM
Edit index.template.pho
Title: Re: Editing the word 'Newbie' etc.
Post by: Big Gee on October 25, 2013, 03:29:24 AM
Quote from: Kindred on October 24, 2013, 08:31:02 PM
Edit index.template.pho

Thanks - can anyonr give me a bit more than that please? Like what in index.template.php.

Ta

G.
Title: Re: Editing the word 'Newbie' etc.
Post by: kat on October 25, 2013, 06:07:11 AM
Don't you hate it, when you know what's needed, yet your mind goes blank?

<a href="', $scripturl, '">', empty($context['header_logo_url_html_safe']) ? $context['forum_name'] : '<img src="' . $context['header_logo_url_html_safe'] . '" alt="' . $context['forum_name'] . '" />', '</a>

You have to add the URL, in there, somewhere, I believe. But, my mind's gone blank on the "How"...

I'll try and get back, later, when my brain's woken up...
Title: Re: Editing the word 'Newbie' etc.
Post by: margarett on October 25, 2013, 07:30:13 AM
Actually in this theme it's not that easy because the image is loaded from CSS, not directly from index.template.
I would take this question to the theme's support topic...
Title: Re: Editing the word 'Newbie' etc.
Post by: Big Gee on October 25, 2013, 09:53:09 AM
Quote from: K@ on October 25, 2013, 06:07:11 AM
Don't you hate it, when you know what's needed, yet your mind goes blank?

<a href="', $scripturl, '">', empty($context['header_logo_url_html_safe']) ? $context['forum_name'] : '<img src="' . $context['header_logo_url_html_safe'] . '" alt="' . $context['forum_name'] . '" />', '</a>

You have to add the URL, in there, somewhere, I believe. But, my mind's gone blank on the "How"...

I'll try and get back, later, when my brain's woken up...

(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fgardenerschat-shed.net%2Fpics%2Fsmily%2Fhehe.gif&hash=e0b6a052d2cc566062286c926bdef73ccea40489) My brains been drawing more blanks in latter years than live rounds!!!

Don't worry - I can wait.

Thanls -

G.
Title: Re: Editing the word 'Newbie' etc.
Post by: Big Gee on October 25, 2013, 09:56:15 AM
Quote from: margarett on October 25, 2013, 07:30:13 AM
Actually in this theme it's not that easy because the image is loaded from CSS, not directly from index.template.
I would take this question to the theme's support topic...

OK - thanks - I'll go & knock on their door to see if they'll answer. If not I'll pop back & let you know.

Thankls,

G.
Title: Re: Editing the word 'Newbie' etc.
Post by: kat on October 25, 2013, 11:34:51 AM
If my memoery's not playing tricks, which is entirely possible, I think I just replaced

<a href="', $scripturl, '">

with:

<a href="http://english-72682862726.spampoison.com"> (Change the URL to whatever you need, obviously).

That would've made it something like this:

<a href="http://english-72682862726.spampoison.com">', empty($context['header_logo_url_html_safe']) ? $context['forum_name'] : '<img src="' . $context['header_logo_url_html_safe'] . '" alt="' . $context['forum_name'] . '" />', '</a>

But, from what ol' Margie's been saying, I could be throwing you a bum steer, with that. (It was a LONG time ago and no way could I, even remotely, be called a coder. ;)
Title: Re: Editing the word 'Newbie' etc.
Post by: Kindred on October 25, 2013, 11:39:31 AM
no... that sounds about right, k@
Title: Re: Editing the word 'Newbie' etc.
Post by: kat on October 25, 2013, 11:44:56 AM
'eck! What IS the world coming to?!? :)
Title: Re: Editing the word 'Newbie' etc.
Post by: Big Gee on October 25, 2013, 12:13:17 PM
Thanks Guys -

I can find:

            <a href="', $scripturl, '">', empty($context['header_logo_url_html_safe']) ? $context['forum_name'] : '<img src="' . $context['header_logo_url_html_safe'] . '" alt="' . $context['forum_name'] . '" />', '</a>

In the 'index.template.php' file in the 'Default' theme folder, but not in the 'index.template.php' file in the 'Bright Forest' theme  folder (which I presume is the one I need to edit).

Can you enlighten me a bit more please?

Thanks,

G.
Title: Re: Editing the word 'Newbie' etc.
Post by: Kindred on October 25, 2013, 12:16:41 PM
look  for <a href="', $scripturl, '"> which happens close to $context['forum_name']
Title: Re: Editing the word 'Newbie' etc.
Post by: margarett on October 25, 2013, 12:18:23 PM
Yup, that was I was telling you guys ;)
That line is correct for the default theme. This one is a little bit different...
There isn't a "a href=xxxx" thing here, neither a "img" thing. Just a CSS background image.
Quote from: margarett on October 25, 2013, 07:30:13 AM
I would take this question to the theme's support topic...
;)
Title: Re: Editing the word 'Newbie' etc.
Post by: Kindred on October 25, 2013, 12:23:22 PM
there really should be an
<a href="', $scripturl, '">  line...
Title: Re: Editing the word 'Newbie' etc.
Post by: margarett on October 25, 2013, 12:26:06 PM
Nop, there isn't. The logo isn't "clickable" so there is no HTML for it...

<div id="header"', !empty($settings['header_logo_url_html_safe']) ? ' style="background-image: url(' . $settings['header_logo_url_html_safe'] . ')"' : '', '>
<h1>', $context['forum_name'], '</h1>';

;)
Title: Re: Editing the word 'Newbie' etc.
Post by: Kindred on October 25, 2013, 12:26:51 PM
well, that is just plain silly

it's also a stupid design, IMO...   why would you ever use the logo as a background image?   and why the hell would you add it as inline CSS rather than defined in the CSS file?

Bad theme design, IMO.
Title: Re: Editing the word 'Newbie' etc.
Post by: margarett on October 25, 2013, 12:36:37 PM
Not really, it is in the CSS file, actually. That safe_logo_header_blablabla think is another subject. And I've "print_r'd" $settings and it's not existant.
The CSS has a "background image" for the "header" class.

The think is, it's not that easy to create a link from a CSS background image...
Title: Re: Editing the word 'Newbie' etc.
Post by: margarett on October 25, 2013, 12:43:12 PM
Well, because I'm stubborn :P and despite I've said that this should be taken to the support topic, here it goes :P

index.css, find and remove:

background: url('../images/header.png') no-repeat;


index.template.ph, find:

<div id="header"', !empty($settings['header_logo_url_html_safe']) ? ' style="background-image: url(' . $settings['header_logo_url_html_safe'] . ')"' : '', '>

Replace with:

<div id="header"><a href="http://www.google.pt"><img src="' . $settings['images_url'] . '/header.png"></a>

Please note that you should have your header as "header.png" inside your "images" folder and NOT defined through ACP. It could be improved that way, but it's not important for now :P

Oh, and you probably don't want to go to google.pt ;) Change the link to your homepage.
Title: Re: Editing the word 'Newbie' etc.
Post by: Big Gee on October 25, 2013, 12:45:27 PM
DEFINATELY not in the Bright Forest index.template.php file:

(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fgardenerschat-shed.net%2Fforum%2Fdownloads%2Fscreenshots%2Fssh-01NotePad_index_template_php.jpg&hash=92219f2b0fe1527075d03e99b1f411cc7d8a7550)

Where to from here Fellas?

G
Title: Re: Editing the word 'Newbie' etc.
Post by: margarett on October 25, 2013, 12:46:45 PM
Did you read my previous post(s), specifically the last one? :o

Also, DON'T use Notepad for your file edits... Use a decent editor (Notepad++ or others)
Title: Re: Editing the word 'Newbie' etc.
Post by: Big Gee on October 25, 2013, 01:19:22 PM
Quote from: margarett on October 25, 2013, 12:46:45 PM
Did you read my previous post(s), specifically the last one? :o

Also, DON'T use Notepad for your file edits... Use a decent editor (Notepad++ or others)

Yes thanks Bruno - I'm working on it right now - we have tea breaks in the UK!.

I'm using Notepad because I'm on someone else's machine - I usually use EditPad Lite on my own machine.

I'll come back to let you know how I got on as soon as I've finished.

Thnx -

G.
Title: Re: Editing the word 'Newbie' etc.
Post by: Big Gee on October 25, 2013, 01:41:46 PM
Works a treat - MISSION ACCOMPLOSHED!

Thanks Chaps! Especially you Bruno.

A lot of faff for a small function on - but there you go - such is life sometimes  ;)

All the best to you all -

G.
Title: Re: Editing the word 'Newbie' etc.
Post by: kat on October 25, 2013, 01:50:50 PM
Yay! Good stuff, El Bruno! :)