TinyPortal
Development => Support => Topic started by: Dark-Wolf on March 23, 2009, 09:44:15 PM
Hi!
I've see here that meta description for homepage is
<meta name="description" content="TinyPortal - News" />
and for forum is:
<meta name="description" content="TinyPortal - Index" />
instead for my index is:
<meta name="description" content="DarkWolf" />
and for forum:
<meta name="description" content="DarkWolf - Index" />
I've also optimized with
http://custom.simplemachines.org/mods/index.php?mod=1138 (rel 1.0)
but not change for tinyportal index.
How i can fix?
Thanks in advance, DarkWolf :)
-
Edit: i've patched momentarily with this code:
index.template.php
Search:
// The main sub template above the content.
function template_main_above()
{
global $context, $settings, $options, $scripturl, $txt, $modSettings, $boardurl;
add:
$fixfullurl = 'http://'.$_SERVER['SERVER_NAME'].$_SERVER['REQUEST_URI'];
if (($scripturl == $fixfullurl) || (''.$boardurl.'/' == $fixfullurl)) {
$fixtitlehome = " - News";}
else{ $fixtitlehome = "";}
Now search
<title>', $context['page_title'], '</title>';
replace with:
<title>', $context['page_title'], '', $fixtitlehome , '</title>';
and insert ', $fixtitlehome , ' in description meta.
Maybe isn't the best mode but it work ;)
Is this issue solved? If not, then the best person to ask about this is probably the Mod Creator over on SMF.
ZarPrime
Yes!
Now i've fix more title with this code:
// Fix da inserire dopo il titolo
$fixfullurl = 'http://'.$_SERVER['SERVER_NAME'].$_SERVER['REQUEST_URI'];
$fixlink1 = "http://darkwolf.altervista.org/forum/";
$fixlink2 = "http://darkwolf.altervista.org/forum/index.php";
$fixlink3 = "http://www.darkwolf.altervista.org/forum/";
$fixlink4 = "http://www.darkwolf.altervista.org/forum/index.php";
if (($fixfullurl == $fixlink1) || ($fixfullurl == $fixlink2) || ($fixfullurl == $fixlink3) || ($fixfullurl == $fixlink4)){
$fixtitleafter = " - News";}
elseif ($context['page_title'] == 'Downloads'){
$fixtitleafter = " Area";}
elseif ($context['page_title'] == 'Albums'){
$fixtitleafter = " - Gallery";}
else{ $fixtitleafter = "";}
// Fix da inserire prima del titolo
if (($context['page_title'] == 'Regolamento') || ($context['page_title'] == 'GuestBook')){
$fixtitlebefore = "DarkWolf - ";}
elseif ($context['page_title'] == 'Download'){
$fixtitlebefore = "Area ";}
else{ $fixtitlebefore = "";}
<title>', $fixtitlebefore, '', $context['page_title'], '', $fixtitleafter, '</title> ;)