Author Topic: Meta data  (Read 29119 times)

0 Members and 1 Guest are viewing this topic.

Offline Ofuuzo

  • Newbie
  • *
  • Posts: 29
    • View Profile
Meta data
« on: June 16, 2002, 07:00:03 PM »
Hi,
In version 1.0, meta data can be added as follows:

file /templates/default/head.html:
  <head>
   ....
   <meta name="dc.description" content="{meta_description}">
   <meta name="dc.keywords" content="{meta_keywords}">

 ..
 </head>

and in file /details.php below  line code:

   ShowImage($img_result, URL_IMAGE_ID."=".$image_id."&amp;", 0);
 
the following is inserted;

 $site_template->register_vars(array("meta_description" =>
                   $img_result['image_description'],
                  "meta_keywords" => $img_result['image_keywords']
                  ));

Can you point me in which files I have to look or how I can do that in version 1.5.

Thanks in advance.

- Ofuuzo

Offline Jan

  • Administrator
  • 4images Guru
  • *****
  • Posts: 5.024
    • View Profile
    • 4images - Image Gallery Management System
Re: Meta data
« Reply #1 on: June 16, 2002, 07:56:59 PM »
Code: [Select]
ShowImage($img_result, URL_IMAGE_ID."=".$image_id."&amp;", 0);

is now:

Code: [Select]
show_image($image_row, 0, 1);
Greets Jan
Your first three "must do" before you ask a question:
1. Forum rules
2. FAQ
3. Search

Offline Ofuuzo

  • Newbie
  • *
  • Posts: 29
    • View Profile
Meta data
« Reply #2 on: June 17, 2002, 11:15:14 AM »
I tried to insert the follwing after
 show_image($image_row, 0, 1);
and it is not working.

$site_template->register_vars(array(
                  "meta_keywords" => $img_row['image_keywords'],            
                  "meta_description" => $img_row['image_description']
                  ));

Offline Jan

  • Administrator
  • 4images Guru
  • *****
  • Posts: 5.024
    • View Profile
    • 4images - Image Gallery Management System
Meta data
« Reply #3 on: June 17, 2002, 11:21:34 AM »
Sorry, use:

Code: [Select]
$site_template->register_vars(array(
  "meta_keywords" => $image_row['image_keywords'],
  "meta_description" => $image_row['image_description']
));


Greets Jan
Your first three "must do" before you ask a question:
1. Forum rules
2. FAQ
3. Search

Offline Ofuuzo

  • Newbie
  • *
  • Posts: 29
    • View Profile
Meta data
« Reply #4 on: June 17, 2002, 12:52:25 PM »
Thanks, it works.

Ofuuzo

Offline dani2000

  • Pre-Newbie
  • Posts: 8
    • View Profile
Meta data on version 1.61?
« Reply #5 on: August 06, 2002, 03:19:33 AM »
But how to do it on version 1.61? I try using this method but when I check to the meta data, I see the keywords but does not separated by comma. I think by using this method the keywords and description in the index would be empty! Any suggestion?

Offline Jan

  • Administrator
  • 4images Guru
  • *****
  • Posts: 5.024
    • View Profile
    • 4images - Image Gallery Management System
Meta data
« Reply #6 on: August 06, 2002, 08:25:06 AM »
Use this to show th keywords separated by comma:

Code: [Select]
$site_template->register_vars(array(
  "meta_keywords" => str_replace(" ", ", ", $image_row['image_keywords']),
  "meta_description" => $image_row['image_description']
));


Jan
Your first three "must do" before you ask a question:
1. Forum rules
2. FAQ
3. Search

Offline dani2000

  • Pre-Newbie
  • Posts: 8
    • View Profile
It works, but....
« Reply #7 on: August 07, 2002, 03:39:56 AM »
Thank you Jan, it works! But the problem arise with the index (home) and some of the pages. I see only empty meta data! How to fix this! Thanx!

Offline Jan

  • Administrator
  • 4images Guru
  • *****
  • Posts: 5.024
    • View Profile
    • 4images - Image Gallery Management System
Meta data
« Reply #8 on: August 07, 2002, 08:41:12 AM »
This works only for the detail page. You have to register the meta data in all other main pages too.

Put this in all main php files (index.php, categories.php, lightbox.php, member.php, postcards.php, register.php. search.php, top.php)
Code: [Select]
$site_template->register_vars(array(
  "meta_keywords" => "some keywords",
  "meta_description" => "little description"
));


maybe just before:
Code: [Select]
$site_template->print_template($site_template->parse_template($main_template));
Your first three "must do" before you ask a question:
1. Forum rules
2. FAQ
3. Search

Offline dani2000

  • Pre-Newbie
  • Posts: 8
    • View Profile
Not working
« Reply #9 on: August 08, 2002, 03:34:34 AM »
Jan, I have tried to do your advice, but did not work! I still see empty meta data on some pages. Any suggestion?

Offline Jan

  • Administrator
  • 4images Guru
  • *****
  • Posts: 5.024
    • View Profile
    • 4images - Image Gallery Management System
Meta data
« Reply #10 on: August 08, 2002, 08:26:40 AM »
Can you post a link for pages it doesn't work.

Ja
Your first three "must do" before you ask a question:
1. Forum rules
2. FAQ
3. Search

Offline dani2000

  • Pre-Newbie
  • Posts: 8
    • View Profile
Difference?
« Reply #11 on: August 08, 2002, 10:30:50 AM »
Sorry, I have not uploaded these files yet, 'cause I tried it first on my computer and using personal server (I use apache, PHP, and mysql). Do you think that the result would be different?

Offline Jan

  • Administrator
  • 4images Guru
  • *****
  • Posts: 5.024
    • View Profile
    • 4images - Image Gallery Management System
Meta data
« Reply #12 on: August 08, 2002, 10:49:32 AM »
See: http://demo.4homepages.de
for me it's working.

Did really used this code:
Code: [Select]
$site_template->register_vars(array(
  "meta_keywords" => "some keywords",
  "meta_description" => "little description"
));


Replace "some keywords" and "little desription". I'm not using $image_row['xxx'] here!

Jan
Your first three "must do" before you ask a question:
1. Forum rules
2. FAQ
3. Search

Offline dani2000

  • Pre-Newbie
  • Posts: 8
    • View Profile
Meta data
« Reply #13 on: August 09, 2002, 10:42:05 AM »
Now it's working.....! I made a mistake by putting the code on the wrong line! After I corrected it..... aha... it's working! Thanx you for your help. Just for suggestion: next version it would be great if you have forum on it. Thanx!

Offline jengwen

  • Jr. Member
  • **
  • Posts: 85
    • View Profile
    • http://www.jenrichardsphotography.com
Where to look
« Reply #14 on: January 14, 2003, 10:51:17 PM »
Where do you look to see if it is working?