News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

Always having your board name in the title of your forum

Started by Burpee, April 25, 2005, 12:57:46 PM

Previous topic - Next topic

modtang

Quote from: Burpee on April 25, 2005, 12:57:46 PM
The problem now is that the index of your forum is going to have something like "My community - My community - Index" as a title. This is easily fixed through the language files.
Anyone else using SimplePortal? I'm getting MY COMMUNITY - MY COMMUNITY and I can't seem to fix it. Any suggestions?

Other than that this works great. Thanks a bunch. :)

grandslam

i made it to prevent on the index to have the forum name twice:

if (substr($context['page_title'],0,strlen($context['forum_name'])) == $context['forum_name'])
echo '<title>', $context['page_title'], '</title>';
else
echo '<title>',$context['forum_name'], ' - ', $context['page_title'], '</title>';



[nofollow]grandslam
I could bomb you, I could shoot you, and I could fall on you...

MKava

This works excellent. This was one of the few things that I disliked about SMF forums and so glad to have it fixed. Thanks! :D
M. Kava
SMF Forums: Freaky Forums [nofollow] for NintendoFreaks.com [nofollow]

heavyccasey

#23
This is what I use:

	
if (! 
ereg($context['forum_name'], $context['page_title'])) 
	
	
$context['page_title'] = $context['forum_name']. ' - ' $context['page_title'];

Aileen


Drover

First part went fine but my theme doesn't seem to have anything at all called "languages" or anything close...ideas?  I'm using the 1.Snake.1 theme.  :(

miamizx

Does anyone know how to remove the extra title in the TinyPortal index page? this is the only thing that I can't figure out...

Mac_Hines

Is there no control panel function for changing the name of your community after the initial set up?  Please forgive my extreme newbie-ness but I couldn't find this info anywhere (even though it's probably in a very obvious place). 

Apologies if this is posted in the wrong place.

b33z


Bulakbol

Quote from: Mac_Hines on June 02, 2008, 11:58:26 AM
Is there no control panel function for changing the name of your community after the initial set up?  Please forgive my extreme newbie-ness but I couldn't find this info anywhere (even though it's probably in a very obvious place). 

Apologies if this is posted in the wrong place.

Go to Admin -> Server Settings -> Core Configuration. Replace whatever is in "Forum Title" text box.
Please do not PM me for support · My Mods and Theme · SMF Coding Guidelines · Modifications Approval Guidelines

Mac_Hines

Quote from: JohnyB on June 05, 2008, 03:38:00 AM

Go to Admin -> Server Settings -> Core Configuration. Replace whatever is in "Forum Title" text box.

Thanks JohnyB.  It was right where you said it would be!

TigerTails

Quick hack-it-up for people who have long forum names that could be shortened, like mine ("Unseen Britain - Urban Exploration Community")

That was far too big to have on the front of every tab, and looked terrible.

So, I set "Urban Exploration Community" as my forum title in server options, and in index.template changed title to:
  <title>Unseen Britain - ', $context['page_title'], '</title>';

On the index it shows the usual "Unseen Britain - Urban Exploration Community", and for all other pages it shows "Unseen Britain - <Page name>". EG: "Unseen Britain - Read first"

Hope some of you can make some use of it :).

Bulakbol

You're welcome Mac_Hines. Glad I am of help.

Thank you Tiger Tails for your tip. I am sure it will help other members of our community.
Please do not PM me for support · My Mods and Theme · SMF Coding Guidelines · Modifications Approval Guidelines

Deal

I think if I knew the right word for this I would be able to find my answer elsewhere. This is as close to the subject as I found.

I like how the SMF forum displays a small avatar in the browser page name. Mine has the default browser avatar. I would like to add my own small image followed by my sitename (which this post details)



jepot5

Hi
how do I fix this so whenever i go to someone's profile, I will see this

{Custom text I inputed} - Viewing Profile: {Display name}

ccbtimewiz

Quote from: jepot5 on August 20, 2008, 04:05:59 AM
Hi
how do I fix this so whenever i go to someone's profile, I will see this

{Custom text I inputed} - Viewing Profile: {Display name}

Open profile.php

Find:
// Set the page title if it's not already set...
if (!isset($context['page_title']))
$context['page_title'] = $txt['profile'] . ' - ' . $txt[$_REQUEST['sa']];


Replace with:
// Set the page title if it's not already set...
if (!isset($context['page_title']))
$context['page_title'] = 'Text you want to show '.$txt['profile'] . ' - ' . $txt[$_REQUEST['sa']];


Deal

I wonder if someone would be so kind as to assist me with a problem I am having trying to implement either of the solutions for implementing this change by modifying index_template.php  (the babylon theme)

I tried replacing line:

<title>', $context['page_title'], '</title>';

with grandslams mod, and then with Caseys mod and both resulted in a parsing error. I even compared (using notepad++) the resulting source of the file to ensure that that is the only mod to the file. I used the 1.1.5 babylon theme source as the master file.

Where did I go wrong here? Thanks.

Deal

The error I get is:

Parse error: syntax error, unexpected T_STRING, expecting ',' or ';' in .../Themes/babylon/index.template.php on line 81

line 81 is either of the revised lines selected and pasted from this post.






Advertisement: