Please login or register.

Login with username, password and session length
Advanced search  

News:

Latest sNews - sNews 1.7 - with its own forums - for discussion and user mods.

Author Topic: 3 whitepaces in title tag  (Read 6017 times)

Sven

  • ULTIMATE member
  • ******
  • Karma: 88
  • Posts: 2029
  • Chasing MY bugs!
    • hiseo.fr - rédacteur Web
3 whitepaces in title tag
« on: September 24, 2008, 12:38:56 PM »

Quote
<title>   sNews 1.7 Live Demo</title
But I didn't find where's the bug.

philmoz

  • High flyer
  • ULTIMATE member
  • ******
  • Karma: 161
  • Posts: 1988
    • fiddle 'n fly
Re: 3 whitepaces in title tag
« Reply #1 on: September 24, 2008, 04:42:55 PM »

in title function...

Code: [Select]
$title = "$arttitle $name $xname $site_title";
change to

Code: [Select]
$title = $arttitle.$name.$xname.$site_title;
whitespaces will then vanish.

Good catch, thx.
Logged
Of all the things I have lost, it is my mind that I miss the most.

Hedphuq

  • Newbie
  • *
  • Karma: 0
  • Posts: 6
Re: 3 whitepaces in title tag
« Reply #2 on: October 10, 2008, 10:17:27 AM »

the fix works but changes the title for posts to <title>[post title] -[category] -[site title]</title>
so the space between the separator and the next item in the title is not there anymore. trying to fix it but PHP isn't one of my talents.
Logged
.:Hedphuqed

philmoz

  • High flyer
  • ULTIMATE member
  • ******
  • Karma: 161
  • Posts: 1988
    • fiddle 'n fly
Re: 3 whitepaces in title tag
« Reply #3 on: October 10, 2008, 02:07:17 PM »

this has been rectified in RC2
to fix in earlier RC version, need or alter these lines to this
Code: [Select]
$arttitle =  $_TITLE ? $_TITLE.' - ' : '';
$name = $_NAME ? $_NAME.' - ' : '';
$xname = $_XNAME ? $_XNAME.' - ' : '';
Logged
Of all the things I have lost, it is my mind that I miss the most.

Hedphuq

  • Newbie
  • *
  • Karma: 0
  • Posts: 6
Re: 3 whitepaces in title tag
« Reply #4 on: October 10, 2008, 04:40:25 PM »

weird, I had the same issue as Sven using RC2. in the meanwhile I fixed the issue I had by changing
Code: [Select]
$arttitle =  $_TITLE ? $_TITLE.' -' : '';
$name = $_NAME ? $_NAME.' -' : '';
$xname = $_XNAME ? $_XNAME.' -' : '';
to
Code: [Select]
$arttitle =  $_TITLE ? $_TITLE.' - ' : '';
$name = $_NAME ? $_NAME.' - ' : '';
$xname = $_XNAME ? $_XNAME.' - ' : '';
it seems my snews.php was missing the extra space after the -
Logged
.:Hedphuqed

philmoz

  • High flyer
  • ULTIMATE member
  • ******
  • Karma: 161
  • Posts: 1988
    • fiddle 'n fly
Re: 3 whitepaces in title tag
« Reply #5 on: October 10, 2008, 05:10:05 PM »

RC2 was issued with this change. Check the top of your snews.php.
it should read similar to
Quote
/********************************************************

   sNews 1.7 Release Candidate - 2
   Copyright (C) Solucija.com
   sNews is licensed under a Creative Commons License

*********************************************************/
Logged
Of all the things I have lost, it is my mind that I miss the most.

Hedphuq

  • Newbie
  • *
  • Karma: 0
  • Posts: 6
Re: 3 whitepaces in title tag
« Reply #6 on: October 10, 2008, 05:13:30 PM »

hmm, mine is sNews 1.7 Release Candidate - Build 133a-5.
seems i downloaded the rc2 too early? got it from the rc2 dowload thread.
edit: downloaded it again and the top of the file still says News 1.7 Release Candidate - Build 133a-5.
Logged
.:Hedphuqed

philmoz

  • High flyer
  • ULTIMATE member
  • ******
  • Karma: 161
  • Posts: 1988
    • fiddle 'n fly
Re: 3 whitepaces in title tag
« Reply #7 on: October 10, 2008, 05:26:13 PM »

only one thing to say about that...

**bollocks - I've stuffed up ***

Please try once more..

*sorry*

Now, it seems to be the correct release :(
« Last Edit: October 10, 2008, 05:36:33 PM by philmoz »
Logged
Of all the things I have lost, it is my mind that I miss the most.

Hedphuq

  • Newbie
  • *
  • Karma: 0
  • Posts: 6
Re: 3 whitepaces in title tag
« Reply #8 on: October 10, 2008, 06:00:16 PM »

great to hear it's fixed. will try when i get home from work. modified my snews.php quite a bit to get it working with a design I found. stupid to start that when it's only a RC but ok. let's start over.
Logged
.:Hedphuqed