Dragonfly CMS v9 ⇒ Coppermine ⇒ displayimagepopup.php - make seo friendly ⇒ Community Forums ⇒ CPG Dragonfly™ CMS
Forum Index Modules & Blocks Coppermine

displayimagepopup.php - make seo friendly Reply to topic


well, I have been looking at various display_image.php, etc... template, theme files and cannot figure out where I would even start. a poke in the ribs to get me started would be appreciated. Basically on the page that displays each intermediate (normal_) picture I want to have custom title and meta data for that page. As it is right now it appears to use the same title as for that album. So the finished product title should be something like <title>Site title > Album Name > Picture title </title>

thanks

-Dustin

Celebrity Babes | Celebrity Videos | Funny Videos | Information for Men

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
Linux/Apache 1.3/4.1.21/5.2.1/9.2.0.RC1


just need some guidance here. as per the last couple of entries in this thread I am trying to take display_picture.inc and modify it so they dynamically get assigned their own page title and meta information or at least their own page title. Here is the code for display_picture.inc, can someone guide me on what would need to be done? I have played with it a bit, but just don't understand it that well. The only modifications to this file from the core is the google ads. The basic goal here is to increase the SEO value of the pages, as google currently sees each page as a duplicate since they all have the same title information. I am guessing others would be greatly interested in this modification as well. TIA

<?php $template_display_picture = '<tr> <td class="tableb" height="{CELL_HEIGHT}" style="float:none;padding: 0px;"> <table align="center" cellspacing="2" cellpadding="0" style="background-color: #FFFFFF; margin-top: 30px; margin-bottom: 30px;"> <tr colspan="3"> <td valign="top" align="center" colspan="3"> <a href="http://www.site5.com/in.php?id=27716-11" target="new"><img alt="Banner, 234x60px" border="0" src="http://www.site5.com/creative/2db/234x60.gif" /></a> </td></tr> <tr> <td valign="top" align="right"> <script type="text/javascript"><!-- google_ad_client = "pub-6161336383450593"; //120x240, created 1/18/08 google_ad_slot = "2328801838"; google_ad_width = 120; google_ad_height = 240; //--></script> <script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"> </script></td> <td valign="top"> {IMAGE} {ADMIN_MENU} </td> <td valign="top" align="left"> <script type="text/javascript"><!-- google_ad_client = "pub-6161336383450593"; /* 120x240, created 2/5/08 */ google_ad_slot = "9980440265"; google_ad_width = 120; google_ad_height = 240; google_cpa_choice = ""; // on file //--> </script> <script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"> </script> </td> </tr> </table> <!-- BEGIN img_desc --> <table cellpadding="0" cellspacing="0" class="img_caption_table"> <!-- BEGIN title --> <tr> <th> {TITLE} </th> </tr> <!-- END title --> <!-- BEGIN caption --> <tr> <td> {CAPTION} </td> </tr> <!-- END caption --> </table> <!-- END img_desc --> </td> </tr>'; ?>

-Dustin

Celebrity Babes | Celebrity Videos | Funny Videos | Information for Men

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
Linux/Apache 1.3/4.1.21/5.2.1/9.2.0.RC1


anyone get further with this? I have only just realised that this is the case! why has this been ignored from the team?

Need a new 3D Desktop wallpaper? 3D Wallpapers UK - Original 3D Digital Wallpapers

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
Windows 2003 Server / Apache / MySQL 5.0.41 / PHP Version 4.4.7 / CMS Version 9.1.2.1


3DdesktopsUK wrote
why has this been ignored from the team?


Probably because of this?

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
none available


hi and thanks, sorry should have been more specific in my post. I was really commenting on the coppermine page titles and meta, not the popup. IE:

www.3ddesktops.co.uk/c...pos=0.html

This page, for example, could have the title of the image itself and the meta data would contain the image keywords rather than the top level album information.

thanks in advance

Need a new 3D Desktop wallpaper? 3D Wallpapers UK - Original 3D Digital Wallpapers

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
Windows 2003 Server / Apache / MySQL 5.0.41 / PHP Version 4.4.7 / CMS Version 9.1.2.1


3DdesktopsUK wrote
the meta data would contain the image keywords rather than the top level album information.

<meta name="keywords" content="woman archer trees 3d wallpaper" />

Aren't these the picture "keywords" that you specified already?
PHP code is telling me that will use the specified image keywords if any, otherwise it will use the general module keywords.

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
none available


yes, keywords work , but the title change is the BIG issue, it uses the same title for every picture in the album, the title is always set to the album name. so if the album name is "test" and the picture name is "test123" the title of the page will always be "test", it doesn't change.

-Dustin

Celebrity Babes | Celebrity Videos | Funny Videos | Information for Men

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
Linux/Apache 1.3/4.1.21/5.2.1/9.2.0.RC1


I think it would be something that needs to be changed in the modules/coppermine/includes/load.inc file, perhaps some part of this code, not a php guy at all so not sure what would need to be changed...

// Set nice page title
$pagetitle .= $CONFIG['gallery_name'];
$value = $db->sql_ufetchrow("SELECT value FROM " . $cpg_prefix . "config WHERE name='nice_titles'", SQL_NUM, __FILE__,__LINE__);
if ($value[0]) {
$breadcrumb = array();
if (isset($album)&&(is_numeric($album) && $album > 0)) {
$result = $db->sql_query("SELECT aid AS id, title, category AS parent FROM {$CONFIG['TABLE_ALBUMS']} WHERE aid = ".$album);
if ($db->sql_numrows($result) > 0) {
$breadcrumb[] = $db->sql_fetchrow($result);
$db->sql_freeresult($result);
}
}
else if (is_numeric($cat) && $cat > 0) {
if ($cat > FIRST_USER_CAT) {
$result = $db->sql_query("SELECT username AS title FROM {$CONFIG['TABLE_USERS']} WHERE user_id = " . ($cat - FIRST_USER_CAT));
if ($db->sql_numrows($result) != 0) {
$row = $db->sql_fetchrow($result);
$row['id'] = $cat;
$row['parent'] = 1;
$breadcrumb[] = $row;
$db->sql_freeresult($result);
}
}
else {
$result = $db->sql_query("SELECT cid as id, parent, catname AS title FROM {$CONFIG['TABLE_CATEGORIES']} WHERE cid='$cat'");
if ($db->sql_numrows($result) > 0) {
$breadcrumb[] = $db->sql_fetchrow($result);
$db->sql_freeresult($result);
}
}
}
get_breadcrumb($breadcrumb);
foreach($breadcrumb as $crumb) {
$pagetitle .= " "._BC_DELIM." ".$crumb['title'];
}
if (!defined('PIC_VIEWS')) {
get_lang('coppermine', __FILE__, __LINE__);
}
if (isset($_GET['meta']) && ($_GET['meta']!='')) {
$pagetitle .= " "._BC_DELIM." ".$lang_meta_album_names[$_GET['meta']];
}
if ($pagetitle == "") $pagetitle = $CONFIG['gallery_name'];
}
else $pagetitle .= $CONFIG['gallery_name'];
}
}

-Dustin

Celebrity Babes | Celebrity Videos | Funny Videos | Information for Men

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
Linux/Apache 1.3/4.1.21/5.2.1/9.2.0.RC1


exactly InspectorClueNo, and apologies as the meta does work already, but as dusman said, the page title is the most important thing here...

any suggestions would be very welcomed

Need a new 3D Desktop wallpaper? 3D Wallpapers UK - Original 3D Digital Wallpapers

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
Windows 2003 Server / Apache / MySQL 5.0.41 / PHP Version 4.4.7 / CMS Version 9.1.2.1


* BUMP *

Need a new 3D Desktop wallpaper? 3D Wallpapers UK - Original 3D Digital Wallpapers

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
Windows 2003 Server / Apache / MySQL 5.0.41 / PHP Version 4.4.7 / CMS Version 9.1.2.1


*rebump* Wink

-Dustin

Celebrity Babes | Celebrity Videos | Funny Videos | Information for Men

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
Linux/Apache 1.3/4.1.21/5.2.1/9.2.0.RC1


bookmarked

.:: I met php the 03 December 2003 :: Unforgettable day! ::.

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
CloudLinux / Apache 2.4 LSAPI / MySQLi 5.6 / PHP 5.6 / DCVS


Hey Nano, this mean you will be able to take a look at this? - that would be fantastic.

Thanks

Need a new 3D Desktop wallpaper? 3D Wallpapers UK - Original 3D Digital Wallpapers

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
Windows 2003 Server / Apache / MySQL 5.0.41 / PHP Version 4.4.7 / CMS Version 9.1.2.1


Nano always gets it done, he has solved quite a few bug reports for me in the past. Thanks Nano!

-Dustin

Celebrity Babes | Celebrity Videos | Funny Videos | Information for Men

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
Linux/Apache 1.3/4.1.21/5.2.1/9.2.0.RC1


Hey nano, since it looks like you were going to check this out, looks like the meta description could also be reworked, appears to be the same for all pages/images. thanks again

-Dustin

Celebrity Babes | Celebrity Videos | Funny Videos | Information for Men

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
Linux/Apache 1.3/4.1.21/5.2.1/9.2.0.RC1

All times are UTC


Jump to: