News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

Editing the word 'Newbie' etc.

Started by Big Gee, October 24, 2013, 11:56:15 AM

Previous topic - Next topic

Big Gee

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.

Arantor

Admin > Members > Membergroups

You can edit the names of the groups in there.

kat

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. ;)

Big Gee

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.


Big Gee

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.

Kindred

Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Big Gee

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.

kat

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...

margarett

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...
Se forem conduzir, não bebam. Se forem beber... CHAMEM-ME!!!! :D

QuoteOver 90% of all computer problems can be traced back to the interface between the keyboard and the chair

Big Gee

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...

My brains been drawing more blanks in latter years than live rounds!!!

Don't worry - I can wait.

Thanls -

G.

Big Gee

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.

kat

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. ;)

Kindred

Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

kat

'eck! What IS the world coming to?!? :)

Big Gee

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.

Kindred

look  for <a href="', $scripturl, '"> which happens close to $context['forum_name']
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

margarett

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...
;)
Se forem conduzir, não bebam. Se forem beber... CHAMEM-ME!!!! :D

QuoteOver 90% of all computer problems can be traced back to the interface between the keyboard and the chair

Kindred

there really should be an
<a href="', $scripturl, '">  line...
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

margarett

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>';

;)
Se forem conduzir, não bebam. Se forem beber... CHAMEM-ME!!!! :D

QuoteOver 90% of all computer problems can be traced back to the interface between the keyboard and the chair

Kindred

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.
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

margarett

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...
Se forem conduzir, não bebam. Se forem beber... CHAMEM-ME!!!! :D

QuoteOver 90% of all computer problems can be traced back to the interface between the keyboard and the chair

margarett

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.
Se forem conduzir, não bebam. Se forem beber... CHAMEM-ME!!!! :D

QuoteOver 90% of all computer problems can be traced back to the interface between the keyboard and the chair

Big Gee

DEFINATELY not in the Bright Forest index.template.php file:



Where to from here Fellas?

G

margarett

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)
Se forem conduzir, não bebam. Se forem beber... CHAMEM-ME!!!! :D

QuoteOver 90% of all computer problems can be traced back to the interface between the keyboard and the chair

Big Gee

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.

Big Gee

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.

kat


Advertisement: