Dragonfly CMS v9 ⇒ Coppermine ⇒ displayimagepopup.php - make seo friendly ⇒ Community Forums ⇒ CPG Dragonfly™ CMS
Forum IndexModules & BlocksCoppermine

displayimagepopup.php - make seo friendly Reply to topic


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

<!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

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


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

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


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 Wink

Pro_News CM™ - Content Management for Dragonfly CMS™

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
Linux / 1.3.39 - 2.4.9 / 5.5.42 - 5.6.16 / 5.4.37 - 5.5.11 / 9.4


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

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


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 CM™ - Content Management for Dragonfly CMS™

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
Linux / 1.3.39 - 2.4.9 / 5.5.42 - 5.6.16 / 5.4.37 - 5.5.11 / 9.4


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

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


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 CM™ - Content Management for Dragonfly CMS™

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
Linux / 1.3.39 - 2.4.9 / 5.5.42 - 5.6.16 / 5.4.37 - 5.5.11 / 9.4


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

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


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 CM™ - Content Management for Dragonfly CMS™

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
Linux / 1.3.39 - 2.4.9 / 5.5.42 - 5.6.16 / 5.4.37 - 5.5.11 / 9.4


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

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


SEO friendly

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! ::.

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
CloudLinux / Apache 2.4 LSAPI / MySQLi 5.7 / PHP 7.3 / head


funny, I was actually just noticing that it was via a javascript....guess that kills this idea Wink 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


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

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


$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! ::.

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
CloudLinux / Apache 2.4 LSAPI / MySQLi 5.7 / PHP 7.3 / head


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

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: