forum.coppermine-gallery.net

Dev Board => cpg1.4 Testing/Bugs => cpg1.4 Testing/Bugs: FIXED/CLOSED => Topic started by: Makc666 on December 02, 2008, 11:11:02 am

Title: [Fixed]: [cpg1.5.x]: meta name="keywords" & link rel="start" are on the same line
Post by: Makc666 on December 02, 2008, 11:11:02 am
If you will open this page:
http://coppermine-gallery.net/demo/cpg14x/displayimage.php?album=29&pos=1&displayimage_php?album=29&lang=english

You can see this line in HTML code:
Code: [Select]
<meta name="keywords" content="ArtitstWantedCompetition2006"/><link rel="start" href="displayimage.php?album=29&amp;pos=0" title="Return to start" />
But it seems to me it must look like:
Code: [Select]
<meta name="keywords" content="ArtitstWantedCompetition2006"/>
<link rel="start" href="displayimage.php?album=29&amp;pos=0" title="Return to start" />

To fix this one...

Open:
include/themes.inc.php

Find:
Code: [Select]
       $meta_nav .= "<link rel=\"start\" href=\"$start_tgt\" title=\"$start_title\" />
        ";

Replace with:
Code: [Select]
       $meta_nav .= "
<link rel=\"start\" href=\"$start_tgt\" title=\"$start_title\" />
";

The second line and third one must start from the beginning of the line!

Find:
Code: [Select]
       $meta_nav .= "<link rel=\"last\" href=\"$end_tgt\" title=\"$end_title\" />
        ";

Replace with:
Code: [Select]
       $meta_nav .= "<link rel=\"last\" href=\"$end_tgt\" title=\"$end_title\" />
";

The second line must start from the beginning of the line!

Find:
Code: [Select]
                               $meta_nav .= "<link rel=\"prev\" href=\"$prev_tgt\" title=\"$prev_title\" />
                                ";

Replace with:
Code: [Select]
       $meta_nav .= "<link rel=\"prev\" href=\"$prev_tgt\" title=\"$prev_title\" />
";

The second line must start from the beginning of the line!

Find:
Code: [Select]
                               $meta_nav .= "<link rel=\"next\" href=\"$next_tgt\" title=\"$next_title\"/>
                                ";

Replace with:
Code: [Select]
       $meta_nav .= "<link rel=\"next\" href=\"$next_tgt\" title=\"$next_title\"/>
";

The second line must start from the beginning of the line!

Find:
Code: [Select]
       $meta_nav .= "<link rel=\"up\" href=\"$thumb_tgt\" title=\"".$lang_img_nav_bar['thumb_title']."\"/>
        ";

Replace with:
Code: [Select]
       $meta_nav .= "<link rel=\"up\" href=\"$thumb_tgt\" title=\"".$lang_img_nav_bar['thumb_title']."\"/>";
Title: Re: meta name="keywords" & link rel="start" are on the same line
Post by: Makc666 on December 02, 2008, 11:22:49 am
After all changes you will have smth like this:

Code: [Select]
<meta name="keywords" content="test1,test2"/>
<link rel="start" href="displayimage-1-0.html" title="Return to start" />
<link rel="last" href="displayimage-1-8.html" title="Skip to end" />
<link rel="next" href="displayimage-1-1.html" title="See next file"/>
<link rel="up" href="thumbnails-1-page-1.html" title="Return to the thumbnail page"/>
<link rel="stylesheet" href="themes/classic/style.css" type="text/css" />

And not this one:
Code: [Select]
<meta name="keywords" content="test1,test2"/><link rel="start" href="displayimage-1-0.html" title="Return to start" />
        <link rel="last" href="displayimage-1-8.html" title="Skip to end" />
        <link rel="next" href="displayimage-1-1.html" title="See next file"/>
                                <link rel="up" href="thumbnails-1-page-1.html" title="Return to the thumbnail page"/>
       
<link rel="stylesheet" href="themes/classic/style.css" type="text/css" />
Title: Re: meta name="keywords" & link rel="start" are on the same line
Post by: Nibbler on December 23, 2008, 07:04:14 pm
Already done for 1.5 apparently.
Title: Re: [cpg1.5.x]: meta name="keywords" & link rel="start" are on the same line
Post by: Joachim Müller on May 24, 2009, 01:48:48 pm
Not sure who quacked the strange extra spaces into the code that don't make sense at all. Anyway, went through include/themes.inc.php in the SVN repository for cpg1.4.x (revision 5981) and added a proper line break (not the code suggested in this thread though). Applied the fix for themes/sample/theme.php as well.
Change will go into cpg1.4.24.
Marking as "fixed" and moving accordingly.