| Author |
Message |
callisto
MD NewNew

Joined: Oct 17, 2007
Posts: 4
Location: Poland
Member
|
 Posted:
June 25, 2008 - 02:52 AM |
|
| Post subject: Title for MDForum |
|
|
 |
Bonzo
MD user level 5


Joined: Sep 15, 2004
Posts: 55
Location: Rome - Italy
bannato
|
 Posted:
June 25, 2008 - 05:25 AM |
|
| Post subject: Tag Title, Meta tag Keywords and Description on MDForum |
When posts a problem indicates always your work environment, the version of MDPro uses and that the version of the module which ask for support.
This is required as written in the Posting Guidelines
Now let's go to your problem:
MDForum generates the TITLE and META-TAGS (keywords, description, author...)
dynamically . In other words, change depending on the page where you are.
All these parameters are manageable from the file header of the default template's MDForum
The default template in MDForum is MDTheme. The file header is headerBB2.php and the path where you will find is this:
modules/MDForum/templates/MDTheme/headerBB2.php
At line 100 of headerBB2.php you find:
* article page output
Below fact there are lines that generate the TITLE TAG, Meta-Tag KEYWORDS and DESCRIPTION. Then still below all other meta tags. The code that you need to find is this:
| Code:
|
/**
* article page output
*/
global $info, $hometext;
echo "<title>$info[title] :: ".pnConfigGetVar('sitename').' :: '.pnConfigGetVar('slogan')."</title>\n";
if (pnConfigGetVar('dyn_keywords') == 1) {
$htmlless = check_html($info['maintext'], $strip ='nohtml');
$symbolLess = trim(ereg_replace('("|\?|!|:|\.|\(|\)|;|\\\\)+', ' ', $htmlless));
$keywords = ereg_replace('( |'.CHR(10).'|'.CHR(13).')+', ',', $symbolLess);
$metatags = ereg_replace(",+", ",",$keywords);
echo "<meta http-equiv=\"Keywords\" content=\"$metatags\">\n";
} else {
echo "<meta name=\"KEYWORDS\" content=\"".pnConfigGetVar('metakeywords')."\">\n";
}
} else {
/**
* all other page output
*/
echo '<title>'.pnConfigGetVar('sitename').' :: '.$page_title."</title>\n";
echo '<meta name="KEYWORDS" content="'.pnConfigGetVar('metakeywords')."\">\n";
}
echo '<meta name="DESCRIPTION" content="'.$page_title."\">\n";
echo "<meta name=\"ROBOTS\" content=\"INDEX,FOLLOW\">\n";
echo "<meta name=\"resource-type\" content=\"document\">\n";
echo "<meta http-equiv=\"expires\" content=\"0\">\n";
echo '<meta name="author" content="'.pnConfigGetVar('sitename')."\">\n";
echo '<meta name="copyright" content="Copyright (c) 2007 by '.pnConfigGetVar('sitename')."\">\n";
echo "<meta name=\"revisit-after\" content=\"1 days\">\n";
echo "<meta name=\"distribution\" content=\"Global\">\n";
echo '<meta name="generator" content="MDPro '._MD_VERSION_NUM." - http://www.MAXdev.com\">\n";
echo "<meta name=\"rating\" content=\"General\">\n";
|
Greetings |
_________________ Bonzo (aka Matteo Carletti)
www.isartegiovagnoli.com - Istituto Statale d'Arte di Sansepolcro e Anghiari
www.agriturismoilsasso.it || www.agriturismoanghiari.it
www.beccacciaiditalia.com |
|
|
 |
callisto
MD NewNew

Joined: Oct 17, 2007
Posts: 4
Location: Poland
bannato
|
 Posted:
June 25, 2008 - 09:59 AM |
|
|
Thanks!
version:MD-Pro 1.0.76
Module:subjects and news
I have another problem:
I can not activate meta categories:
http://www.audiophile.pl/d/1_alpine
and keywords for news:
http://www.audiophile.pl/n/108_radia_samochodowe
subcategories and subid are ok.
My code in xhtml
| Code:
|
<?php
/**
* xhtml.php
*
* @version $Id: xhtml.php,v 1.1 2005/10/14 05:25:36 timax Exp $
* @copyright 2004
*/
global $PHP_SELF;
if (eregi("xhtml.php", $PHP_SELF)) {
die ("You can't access this file directly...");
}
/*function head()
{
}*/
/*function footer ()
{
}*/
function meta_tags ($type) // handles meta-tags and title
{
global $info, $hometext;
switch($type){
case 1:
if ($artpage==1) {
global $info, $hometext;
echo "<title>$info[title] </title>\n";
echo "<META name=\"keywords\" content=\"".$info[title]."\"".xhtml_close_tag()."\n";
echo "<META name=\"description\" content=\"".$info[title]." ".pnConfigGetVar('slogan')." ".$info[title]."\"".xhtml_close_tag()."\n"; // dodanie na poczatku, tytulu produktow.
} else {
echo "<title>".$info[title]." - Car Audio</title>\n"; // title dla podkategorii, dodanie do tytulu.
echo "<META name=\"keywords\" content=\"".$info['keywords']."\"".xhtml_close_tag()."\n";
echo "<META name=\"description\" content=\"".$info[title]." ".pnConfigGetVar('slogan')."\"".xhtml_close_tag()."\n"; // dodanie na poczatku, tytulu podkategorii w opisie.
}
if ($module == 'modules/subjects/pnuser.php') {
echo "<title>$info[title] </title>\n";
echo "<META name=\"keywords\" content=\"".$info[title]."\"".xhtml_close_tag()."\n";
echo "<META name=\"description\" content=\"".pnConfigGetVar('slogan')."\"".xhtml_close_tag()."\n";
}
break;
default:
include "includes/mdTitle.php";
if ($pagetitle = pnModTitle()) {
echo "<title>$info[title] </title>\n";
echo "<META name=\"keywords\" content=\"".$info['keywords']."\"".xhtml_close_tag()."\n";
echo "<META name=\"description\" content=\"".pnConfigGetVar('slogan')."\"".xhtml_close_tag()."\n";
} else {
echo "<title>".pnConfigGetVar('sitename')."AudioPhile.pl - Car Audio, Radia Samochodowe, Głośniki, Wzmacniacze</title>\n"; // strona glowna.
echo "<META name=\"keywords\" content=\"".pnConfigGetVar('metakeywords')."\"".xhtml_close_tag()."\n" ;//strona glowna.
echo "<META name=\"description\" content=\"".pnConfigGetVar('slogan')."\"".xhtml_close_tag()."\n";
}
// Changes end.
}
echo "<META http-equiv=\"Content-Type\" content=\"text/html; charset=".xhtml_encoding()."\"".xhtml_close_tag()."\n";
echo "<META name=\"generator\" content=\"MD-Pro "._PN_VERSION_NUM." - http://www.maxdev.com\"".xhtml_close_tag()."\n";
echo "<META name=\"copyright\" content=\"Copyright (c) 2006 by ".pnConfigGetVar('sitename')."\"".xhtml_close_tag()."\n";
echo "<META name=\"robots\" content=\"INDEX,FOLLOW\"".xhtml_close_tag()."\n";
echo "<META name=\"revisit-after\" content=\"2 days\"".xhtml_close_tag()."\n";
echo "<META name=\"robots\" content=\"noodp\"".xhtml_close_tag()."\n";
echo "<META http-equiv=\"expires\" content=\"0\"".xhtml_close_tag()."\n";
echo "<link rel=\"alternate\" href=\"".pnGetBaseURL()."backend.php\" type=\"application/rss+xml\" title=\"".pnConfigGetVar('sitename')."\"".xhtml_close_tag()."\n";
}
function xhtml_lang ()
{
/* (x)html language definition */
$xhtmllang = jslanguagelist();
return $xhtmllang[pnSessionGetVar('lang')];
}
function xhtml_dtd_start($type)
{
switch($type){
case 1: // HTML 4.01 Transitional URI (w3c standard mode)
echo "<DOCTYPE>\n";
echo "<html>\n\n<head>\n";
break;
case 2: // HTML 4.01 Strict URI
echo "<DOCTYPE>\n";
echo "<html>\n\n<head>\n";
break;
case 3: // XHTML 1.0 Transitional
/* echo "<xml>\n"; */
echo "<DOCTYPE>\n";
echo "<html>\n\n";
echo "<head>\n";
break;
case 4: // XHTML 1.0 Strict
/* echo "<xml>\n"; */
echo "<DOCTYPE>\n";
echo "<html>\n\n";
echo "<head>\n";
break;
case 5: // XHTML 1.1
/* echo "<xml>\n"; */
echo "<DOCTYPE>\n";
echo "<html>\n\n";
echo "<head>\n";
break;
default: // HTML 4.01 Transitional (quirk-legacy mode)
echo "<DOCTYPE>\n";
echo "<html>\n\n<head>\n";
break;
} // switch
}
function xhtml_close_tag ()
{
$themeversion = atRunningGetVar('themeversion');
if ($themeversion['dtd'] <1>
|
|
_________________ http://www.audiophile.pl/en/produkty.htm
site map for subjects: all category | subcategory | page |
|
|
 |
Bonzo
MD user level 5


Joined: Sep 15, 2004
Posts: 55
Location: Rome - Italy
bannato
|
 Posted:
June 25, 2008 - 11:25 PM |
|
| Post subject: Update MDPro 1.076 to 1.0821. Function meta_tags for News |
| callisto wrote: |
version:MD-Pro 1.0.76
Module:subjects and news |
Woow!! Your version of MDPro is very old, your versione even is the first of 1.080.
MDPro 1.076 also presents some bugs, especially security bug, that we talked extensively in the past.
You'll find news about the security bug:
http://www.maxdev.com/Article637.phtml
And here the report of the bug reported by Secunia.com:
http://secunia.com/advisories/26113/
The staff of mdpro is keen to protect their product and who uses it for that reason has ceased to support the 1.076.
Did you might find the site laundry from a hacker:
the hacker enter on your reserved area, recover all usernames , email, addresses, passwords of your subscribers (then could be used for spam or other) and then you leave a beautiful message on the home page (defacement). Now understand why it is better to upgrade to the latest version?
I give you advice to upgrade to the latest version MDPro (1.0821). To do this you must first upgrade from 1.076 to 1.081 and then upgrade from 1.081 to 1.0821. All this will require some time, but listen to me, it's worth it. Moreover soon released the new version (1.083) and then the 1.085, fully revolutionary, integrated with ajax. Thereafter it will be even more difficult to update and you will be far behind.
I'm signed for a long time in this community, I know how to proceed developments, take what I said as good advice.
This doesn't mean that will not receive answers to your problems. But simply will be more difficult to give you an answer because both I and many others users (including the Staff) don't use version 1.076.
Now let's go to your problem:
I checked the code but I don't think that there are errors.
I'm sorry but I don't know what to tell you.
The only thing I can advise is to look at the file xhtml.php of the new version of MDPro (1.0821).
Do a comparison and see if there is something wrong. Attached file xhtml.php
I hope that you have understood what I wrote with my good English
Greetings |
_________________ Bonzo (aka Matteo Carletti)
www.isartegiovagnoli.com - Istituto Statale d'Arte di Sansepolcro e Anghiari
www.agriturismoilsasso.it || www.agriturismoanghiari.it
www.beccacciaiditalia.com |
|
|
 |
Bonzo
MD user level 5


Joined: Sep 15, 2004
Posts: 55
Location: Rome - Italy
bannato
|
 Posted:
July 15, 2008 - 11:23 PM |
|
| Post subject: Posting Guidelines: open a thread for each singular problem |
|
|
 |
|
|
|