We build. You grow.

Get best community software here

Start a social network, a fan-site, an education project with oxwall - free opensource community software

Duplicate meta descriptions | Forum

dave Leader
dave May 25 '13

Here is the temp fix for the duplicate meta descriptions.   Some of the pages in Oxwall like the blog already have special description but most others will show a standard default description which search engines flag you for having duplicate descriptions.   Some people have wanted a fix so here is a temp fix..

 

open ow_core/application.php

 

about half way down the page you will see this code:

 

if ( $document->getDescription() === null )
 {
  $document->setDescription($language->text('nav', 'page_default_description'));
  }

 

 

change it to this:

 

if ( $document->getDescription() === null )
        {

          // the intro is used as a desc starter for each description
           // you can change this intro to what you want, remember this is the start
           // of all your descriptions so it has to make sense when all put together on the page.

             $mydesc_intro = "We are a unique Social/Dating site dedicated to ";

 

               //you may change these array element descriptions text to what you want. Keep them short and to the point.

         // these are mine for the test, please change these values

             $mydescarr = array(
                                 "the romantic - social - and dating struggles that people with Anorexia and other eating disorders may face",
                                 "the social struggles as well as the dating struggles that people with all eating disorders face",
                                 "meeting other interested in friendship or more with regards to eating disorders",
                                 "romance and all the sex you desire regardless of your personal struggles with eating disorders",
                                 "your right to find love, romance, companionship, and friendship in an online community that cares about your disorder",
                                 "matching you for friendship, love, sex, or romance to those seeking those with eating disorders"
                                 );
  

                $myrandom_desc = $mydesc_intro.array_rand(array_flip($mydescarr),1);
                $document->setDescription($myrandom_desc);


              //original code commented out
            //$document->setDescription($language->text('nav', 'page_default_description'));

 

        }//close if getdescription null

The Forum post is edited by dave May 25 '13
dave Leader
dave May 25 '13

Now this will not prevent SE from catching dups, but it should severely limit the dups you get.

 

:)

Alia Team
Alia May 27 '13
Thanks for sharing Dave.
We are already working on fixing this.
Alia Team
Alia May 27 '13
Topic was moved from General Questions.