[Fixed]: [cpg1.5.x]: meta name="keywords" & link rel="start" are on the same line [Fixed]: [cpg1.5.x]: meta name="keywords" & link rel="start" are on the same line
 

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Main Menu

[Fixed]: [cpg1.5.x]: meta name="keywords" & link rel="start" are on the same line

Started by Makc666, December 02, 2008, 11:11:02 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Makc666

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:
<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:
<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:
       $meta_nav .= "<link rel=\"start\" href=\"$start_tgt\" title=\"$start_title\" />
       ";


Replace with:
       $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:
       $meta_nav .= "<link rel=\"last\" href=\"$end_tgt\" title=\"$end_title\" />
       ";


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


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

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


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


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

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


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


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

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


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

Makc666

After all changes you will have smth like this:

<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:
<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" />


Joachim Müller

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.