Oct 12, 2008 | 02:02 AM  
Welcome

Don't have an account yet? You can create one, it is free, just click here

as a registered user you have some advantages like free downloads, comments and posting on our forums, depending upon this site's configuration and options.

 • •  Control Panel - Register - Login  • • 
Current Stable MDPro Lite 1.0821 Download
  Forum FAQForum FAQ   SearchSearch  UsergroupsUsergroups  PreferencesPreferences  Options forumOptions forum  Watched TopicsWatched Topics  Watched ForumsWatched Forums
Latest forum posts Latest forum posts  Log in to check your private messages Log in to check your private messages    Log inLog in 
Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic
Author Message
callisto
MD NewNew
MD NewNew


Joined: Oct 17, 2007
Posts: 4
Location: Poland
Member
Post  Posted: June 25, 2008 - 02:52 AM Reply with quote Back to top
Post subject: Title for MDForum

Hi
Where to change the title and meta for mdforum?
Thanks

_________________
http://www.audiophile.pl/en/produkty.htm
site map for subjects: all category | subcategory | page
View user's profile Visit poster's website
Bonzo
MD user level 5
MD user level 5


Joined: Sep 15, 2004
Posts: 55
Location: Rome - Italy
bannato
Post  Posted: June 25, 2008 - 05:25 AM Reply with quote Back to top
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
View user's profile Visit poster's website
callisto
MD NewNew
MD NewNew


Joined: Oct 17, 2007
Posts: 4
Location: Poland
bannato
Post  Posted: June 25, 2008 - 09:59 AM Reply with quote Back to top

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
View user's profile Visit poster's website
Bonzo
MD user level 5
MD user level 5


Joined: Sep 15, 2004
Posts: 55
Location: Rome - Italy
bannato
Post  Posted: June 25, 2008 - 11:25 PM Reply with quote Back to top
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
View user's profile Visit poster's website
Bonzo
MD user level 5
MD user level 5


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

@ callisto
When posting a new problem you have to open another thread with the title for your problem and not write continuously all your problems on the same thread.

I have cancelled your last post from this thread and I put your post in a new discussion.
So the answers to your last question will continue in this new thread:
http://www.maxdev.com/MDForum-viewtopic-p-36247.phtml

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
View user's profile Visit poster's website
Display posts from previous:     
Jump to:  
All times are GMT + 13 Hours
Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic
Powered by MDForum 2.0.8© 2003-2007 MAXdev Team
Credits