|
|
| |
Forums ⇒ DragonflyCMS ⇒ Coppermine ⇒ displayimagepopup.php - make seo friendly
displayimagepopup.php - make seo friendlyPlease post bugs in the Projects Module. Post anything and everything else about Coppermine in this forum.
Go to page 1, 2, 3, 4 Next
|
View previous topic :: View next topic |
| Author |
Message |
dusman Dragonfly addicted


Offline Joined: Mar 17, 2006 Posts: 303 Location: Maryland
|
Posted: Fri Jan 11, 2008 1:31 am Post subject: displayimagepopup.php - make seo friendly |
|
I am looking to make the image pop page more seo friendly, I would like to set the <title> to be the image title rather than just "click to close". Would also be nice to add the meta data to the page as well. I have tried various echo's of variables into the title area, but I am not a php expert by any means. anyone have some ideas, seems like this would benefit many people. Thanks
| Code:: |
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html lang="en">
<head>
<base href="http://www.station42.com/" />
<title>Click image to close this window</title> - WANT TO CHANGE THIS
ADD META INFO HERE
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="stylesheet" href="modules/coppermine/themes/default/style.css" />
<meta http-equiv="imagetoolbar" content="no" />
<style type="text/css">
<!--
.imgtbl { position: absolute; left: 0px; top: 0px; overflow: scroll; }
-->
</style>
</head>
<!-- <body>
<a href="javascript:self.close();" title="Click image to close this window"><table width="100%" border="0" cellpadding="0" cellspacing="2" class="imgtbl">
-->
<body>
<table width="100%" border="0" cellpadding="0" cellspacing="2" class="imgtbl" title="">
<td align="center" valign="middle">
<table cellspacing="2" cellpadding="0" style="border: 1px solid #000000; background-color: #FFFFFF;">
<td>
<a href="javascript:window.close();"><img src="modules/coppermine/albums/Kimberly%20Williams/97729150_6b0062e36f.jpg" width="400" height="500" class="image" border="0" alt="Click image to close this window" title="Click image to close this window" /></a> </td>
</table>
</td>
</table><!-- </a>
<script language="JavaScript" type="text/javascript">
</script>-->
</body>
</html> |
_________________ -Dustin
Celebrity Babes | Celebrity Videos | Funny Videos | Information for Men
dusman's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS) Linux/Apache 1.3/4.1.21/5.2.1/9.2.0.RC1
|
|
| Back to top |
|
 |
dusman Dragonfly addicted


Offline Joined: Mar 17, 2006 Posts: 303 Location: Maryland
|
Posted: Sun Jan 13, 2008 6:00 pm Post subject: Re: coppermine displayimagepopup.php help |
|
anyone have any thoughts, basically I want the <title> attribute to be the album and image title for each picture that is shown full size. I would also like to add the meta data to the page, but can't seem to find a good variable to use for each....
_________________ -Dustin
Celebrity Babes | Celebrity Videos | Funny Videos | Information for Men
dusman's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS) Linux/Apache 1.3/4.1.21/5.2.1/9.2.0.RC1
|
|
| Back to top |
|
 |
layingback Forum Admin


Offline Joined: Apr 19, 2004 Posts: 1040
|
Posted: Sun Jan 13, 2008 6:32 pm Post subject: Re: coppermine displayimagepopup.php help |
|
To change the title look in language folder. It's got a comment highlighting it. Windows Explorer > Search > Contains Text is the best way to familiarise yourself with DF internals.
As for meta tags, use same trick to find code that does what you want, then search for the code which generates the HTML you want to alter (same trick, but might take a few different attacks before something bites), then experiment patching new code into existing. If you're lucky you'll just have to update a few variable names. That's the way we all started out.
Just make sure to keep copies of the original code
_________________ Pro_News: The complete module for Dragonfly - now available as version 3.3
layingback's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS) 2.6 - 3.6 / 1.3.42 - 2.2.12 / 5.0.92 - 5.1.37 - 5.1.54 / 4.4.49 - 5.2.17 - 5.3 / 9.2.1
|
|
| Back to top |
|
 |
dusman Dragonfly addicted


Offline Joined: Mar 17, 2006 Posts: 303 Location: Maryland
|
Posted: Sun Jan 13, 2008 7:25 pm Post subject: Re: coppermine displayimagepopup.php help |
|
Thanks for the response, and I understand you "teaching me to fish" ,but I really have no clue to what I should be looking for in the Languauge folder. the file I am looking to modify is not in the languauge folder and the variables I want to use are defined in that same file, however lower down, thus I can't call them (or don't know how) at the <title> section of the page. A little more info would help.
<title>$albumName > $pictureTitle</title>
and
<Meta name , keywords, etc... = $albumName > $pictureTitle>
is basically what I am trying to do in the displayimagepopup.php file
_________________ -Dustin
Celebrity Babes | Celebrity Videos | Funny Videos | Information for Men
dusman's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS) Linux/Apache 1.3/4.1.21/5.2.1/9.2.0.RC1
|
|
| Back to top |
|
 |
layingback Forum Admin


Offline Joined: Apr 19, 2004 Posts: 1040
|
Posted: Sun Jan 13, 2008 8:11 pm Post subject: Re: coppermine displayimagepopup.php help |
|
No problem.
The language files are used to hold the text separately from the code for translation. So just search for the text that you want to change. Sometimes the text is broken up for variables to be displayed in between, so just go with enough to be reasonably unique - 'click ' is probably enough. Hint: The language file for each module is the module's name.
That's the text changed. But if you want to change surrounding code, look up the variable name defined to hold that text you changed (_xxxxxx). Now search for that in /modules/coppermine. And so on and so forth.
You may well get stuck at some point, but by then you should have a specifc question that someone can answer directly, vs. 'does someone want to code this for me', which is a tad too open ended to garner much response.
_________________ Pro_News: The complete module for Dragonfly - now available as version 3.3
layingback's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS) 2.6 - 3.6 / 1.3.42 - 2.2.12 / 5.0.92 - 5.1.37 - 5.1.54 / 4.4.49 - 5.2.17 - 5.3 / 9.2.1
|
|
| Back to top |
|
 |
dusman Dragonfly addicted


Offline Joined: Mar 17, 2006 Posts: 303 Location: Maryland
|
Posted: Sun Jan 13, 2008 8:33 pm Post subject: Re: coppermine displayimagepopup.php help |
|
still not getting it 100%, here is what I have so far
define('CLICK_TO_CLOSE', 'Click image to close this window'); - original code
so how do I define it to be the "albumName > PictureTtitle"
define('CLICK_TO_CLOSE', ??????);
_________________ -Dustin
Celebrity Babes | Celebrity Videos | Funny Videos | Information for Men
dusman's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS) Linux/Apache 1.3/4.1.21/5.2.1/9.2.0.RC1
|
|
| Back to top |
|
 |
layingback Forum Admin


Offline Joined: Apr 19, 2004 Posts: 1040
|
Posted: Sun Jan 13, 2008 11:19 pm Post subject: Re: coppermine displayimagepopup.php help |
|
Look for other examples on how they mix variables with text.
But where it calls CLICK_TO_CLOSE in code it will be something like:
echo CLICK_TO_CLOSE;
which you need to change to something like
echo 'Intro text'.$field1.'middle_text'.$field2.'fini_text';
where $field1 is however the existing code is currently referring to the albumname, and field2 the picture title.
Of course it may not be an echo statement, but some code to display CLICK_TO_CLOSE.
In the above, ' ' surrounds literals, and . appends. SO... if you choose the perpend existing message, it would be along the lines of:
echo CLICK_TO_CLOSE.' Intro text'.$field1.'middle_text'.$field2.'fini_text';
because CLICK_TO_CLOSE is a variable.
BTW php.net/yyyy will give you info on any PHP function if you just type in the function name in place of yyyy.
_________________ Pro_News: The complete module for Dragonfly - now available as version 3.3
layingback's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS) 2.6 - 3.6 / 1.3.42 - 2.2.12 / 5.0.92 - 5.1.37 - 5.1.54 / 4.4.49 - 5.2.17 - 5.3 / 9.2.1
|
|
| Back to top |
|
 |
dusman Dragonfly addicted


Offline Joined: Mar 17, 2006 Posts: 303 Location: Maryland
|
Posted: Tue Jan 15, 2008 9:19 pm Post subject: Re: coppermine displayimagepopup.php help |
|
ok, I give, again thanks for the help and don't take this the wrong way...but, I'd really just like someone to tell me what the single line of code would be for the title to show as the album name and the single line of code to modify the meta information. This is a suppor forum and I really don't have much personal time to try and learn how to program. I like DF, but I am more a user than a programmer. Yes, yes I understand don't be lazy, etc..., etc..., but if you came to my office for Tax help I wouldn't try to teach you the workings of the tax code, I would just help you with what you needed. Again, not being rude , hard to show that in a few lines of text, just need help and am asking for it. Thanks
_________________ -Dustin
Celebrity Babes | Celebrity Videos | Funny Videos | Information for Men
dusman's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS) Linux/Apache 1.3/4.1.21/5.2.1/9.2.0.RC1
|
|
| Back to top |
|
 |
layingback Forum Admin


Offline Joined: Apr 19, 2004 Posts: 1040
|
Posted: Tue Jan 15, 2008 11:15 pm Post subject: Re: coppermine displayimagepopup.php help |
|
Sorry, took a look, even ran a couple of tests, but it's too much work for the amount of time that I have to spare. Maybe someone else who actual wants this?
Your basic issue is that the HTML title is put out first, so the whole module has to be reorganised to determine the filename to display first.
_________________ Pro_News: The complete module for Dragonfly - now available as version 3.3
layingback's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS) 2.6 - 3.6 / 1.3.42 - 2.2.12 / 5.0.92 - 5.1.37 - 5.1.54 / 4.4.49 - 5.2.17 - 5.3 / 9.2.1
|
|
| Back to top |
|
 |
dusman Dragonfly addicted


Offline Joined: Mar 17, 2006 Posts: 303 Location: Maryland
|
Posted: Tue Jan 15, 2008 11:21 pm Post subject: Re: coppermine displayimagepopup.php help |
|
yea, thats what I'm thinking, although I have been able to echo out some variables, but not what I needed, grabbed them from displayimage.php. I am hoping in the future versions DF will be more SEO friendly and some of these standards will be built it. IE "each page should have its own unique title and meta information" Thanks again for your help, I'll keep digging at it and post anything I find, as I am sure others would have an interest. If anyone else has any thoughts they are appreciated.
_________________ -Dustin
Celebrity Babes | Celebrity Videos | Funny Videos | Information for Men
dusman's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS) Linux/Apache 1.3/4.1.21/5.2.1/9.2.0.RC1
|
|
| Back to top |
|
 |
NanoCaiordo Developer


Offline Joined: Jun 29, 2004 Posts: 3878 Location: Melbourne, AU
|
Posted: Wed Jan 16, 2008 3:02 am Post subject: Re: coppermine displayimagepopup.php help |
|
Search Engine Optimization, search engines doesn't understand javascript, so they would never get to the pop up.
_________________ .:: I met php the 03 December 2003 :: Unforgettable day! ::.
Linux 64bit / Apache 2.2 / PHP 5.4 / MySQL 5.5.22 / v9, v10
Linux 32bit / Apache 2.2 / PHP 5.3.10 / MySQL 5.5.22 / v9, v10
Windows 64bit / IIS 7.5 / PHP 5.3.10 / MySQL 5.5.22 / v9, v10
NanoCaiordo's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS) mixed
|
|
| Back to top |
|
 |
dusman Dragonfly addicted


Offline Joined: Mar 17, 2006 Posts: 303 Location: Maryland
|
Posted: Wed Jan 16, 2008 3:08 am Post subject: Re: coppermine displayimagepopup.php help |
|
funny, I was actually just noticing that it was via a javascript....guess that kills this idea  Thanks
_________________ -Dustin
Celebrity Babes | Celebrity Videos | Funny Videos | Information for Men
dusman's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS) Linux/Apache 1.3/4.1.21/5.2.1/9.2.0.RC1
|
|
| Back to top |
|
 |
dusman Dragonfly addicted


Offline Joined: Mar 17, 2006 Posts: 303 Location: Maryland
|
Posted: Wed Jan 16, 2008 3:14 am Post subject: Re: coppermine displayimagepopup.php help |
|
actually, how about this one then, this might be a little easier anyway, when viewing the intermediate picture adding the picture title to the <title> tag so it is unique for each picture as well as the meta? I have already modified display_picture.inc for google ads and other changes, but where would I actually modify the html to get the <title> and <meta> modified?
_________________ -Dustin
Celebrity Babes | Celebrity Videos | Funny Videos | Information for Men
dusman's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS) Linux/Apache 1.3/4.1.21/5.2.1/9.2.0.RC1
|
|
| Back to top |
|
 |
NanoCaiordo Developer


Offline Joined: Jun 29, 2004 Posts: 3878 Location: Melbourne, AU
|
Posted: Wed Jan 16, 2008 7:05 am Post subject: Re: displayimagepopup.php - make seo friendly |
|
$pagetitle = 'your custom title';
$METATAGS['keywords'] = 'custom keywords';
$METATAGS['description'] = 'your custom description';
all of them must be set and defined before calling header.php.
_________________ .:: I met php the 03 December 2003 :: Unforgettable day! ::.
Linux 64bit / Apache 2.2 / PHP 5.4 / MySQL 5.5.22 / v9, v10
Linux 32bit / Apache 2.2 / PHP 5.3.10 / MySQL 5.5.22 / v9, v10
Windows 64bit / IIS 7.5 / PHP 5.3.10 / MySQL 5.5.22 / v9, v10
NanoCaiordo's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS) mixed
|
|
| Back to top |
|
 |
dusman Dragonfly addicted


Offline Joined: Mar 17, 2006 Posts: 303 Location: Maryland
|
Posted: Wed Jan 16, 2008 2:59 pm Post subject: Re: displayimagepopup.php - make seo friendly |
|
thanks, thats is a start, i will check and see what I can do, but just to be clear, I don't want to hard code the pages, I want them to by dynamic based on the album and picture title. So something like:
$pagetitle = '$album $pictitle' - not sure what those varialbes are though.
Thanks for your time
Dustin
_________________ -Dustin
Celebrity Babes | Celebrity Videos | Funny Videos | Information for Men
dusman's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS) Linux/Apache 1.3/4.1.21/5.2.1/9.2.0.RC1
|
|
| Back to top |
|
 |
|
|
All times are GMTGo to page 1, 2, 3, 4 Next
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You cannot download files in this forum
|
| |
 |
 Welcome Anonymous
|
|
|
|