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 page titles | Forum

Paul M.
Paul M. May 24 '13
Im having a big issue with dup page titles. My oxwall site is pretty new and seomoz is showing I have 205 duplicate page titles. I don't see any plugins for this or any way to change them myself. Anybody know how to go about changing this? 
dave Leader
dave May 24 '13
It is mostly because Oxwall i believe uses a static rather than a dynamic variable page title for all the pages.   If you are concerned about your SEO its really not going to make you or break you as it is.  However if it really just bothers you then i will see if i can find a way to change that for you.  
dave Leader
dave May 24 '13
Also if you want to see how your pages are listed and see everything that is indexed on your site, do this:  example..   site: www.oxwall.org  in the google bar.    Put   site: yoursiteurl
Paul M.
Paul M. May 24 '13
That would be cool. I know that with joomla and other types of cms's you can usually have page titles dynamically generated by scraping keywords from the pages content. If oxwall had this that would be awesome. In case anybody else in interested I attached a screenshot.
Attachments:
  seomoz-report.png (38.6Kb)
dave Leader
dave May 24 '13
ok i found it, i going to build an array of names and test this out and at least we can cut down that number of dups for you...   ill hit you back in a bit  :)
Paul M.
Paul M. May 24 '13
Thanks Dave!
dave Leader
dave May 24 '13

ok i got it bud.  Sorry took me a bit, i thought i had it the first time in the lang file but only to discover that the file i was working in got totally rewritten every time so i lost my code lol..

 

So i had to do some tracking and find a better place. 

 

Now i need to be clear on something here, the actual url for the pages is correct, what that means is that if you check the url box, it will show the correct page example  www.mysite.com/dashboard

 

the issue here is that the tabs (which is a different deal all together) is what we wanted to make random.   Because the tabs always said originally sitename - social networking with every link.  So that is what i fixed.

 

So with this code every tab will show a different generic tab name.  They all will start with sitename and then have a random name after that.. 

 

Like this   sitename - random value for the tabs.   So look at the tab not the url bar to test this.

 

open ow_core/application.php

 

almost half way down the page you will see this code.

 

     $language = OW::getLanguage();

 

        if ( $document->getTitle() === null )
        {
         $document->setTitle($language->text('nav', 'page_default_title'));
        }

 

basically what that is doing is pulling the default title from the database. 

 

Your going to change that to look like this

 

 

$language = OW::getLanguage();

 

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

 

         //added to make tab titles random

         /*

          *******************************************************

          *   you can change these array element names to what you want but dont use feature names like

          *  chat or pictures or anything feature wise because you dont want to the tab

          *  to show sitename - chatroom when they are in the dashboard.

          *  so that is why i used generic name that describe the site instead.
          ********************************************************

          */ 

      
         $mytitarr = array("social network","gathering","people mingle","dating","social","meet others","hang out","online social","online dating");

 

          // put your site name here 

          // (sorry i could not find a sitename var that would work here for dynamic value)
         $mysitname = "sitename.com - ";  // no www and keep the space - space at the end


          $myrandom_title = $mysitname.array_rand(array_flip($mytitarr),1);

          $document->setTitle($myrandom_title);

 

               //original code commented out
               // $document->setTitle($language->text('nav', 'page_default_title'));
              
        }//close if gettitle null

 

now save and refresh your page and tell me if thats what you had in mind..

 

let me know  :)

The Forum post is edited by dave May 25 '13
Paul M.
Paul M. May 24 '13
This is pretty cool. So basically its just pulling random keywords from an array and appending them to the $sitename -. I think this will work great.


1. Page titles will always be changing so search engines should like the consistent updates.

2. All of my pages have roughly the same content so my keywords should match anyways.


Once I get home from work I will make the mod and try it out. I'll report back with my findings. Thank you, Dave.


dave Leader
dave May 24 '13

"So basically its just pulling random keywords from an array and appending them to the $sitename - "

 

Yeppers :) 

 

works on this end im adding it to all mysites as well

 

Your welcome  

 

PS dont forget to make a note in notepad or whatever you use of the mod to the file so that come update time you can easily remember and put your mods back if you need them.. Nothing like having to scramble to remember after an update what you changed along the way..

The Forum post is edited by dave May 24 '13
Paul M.
Paul M. May 24 '13
Works like a charm ;)
dave Leader
dave May 24 '13
Thanks glad to help... :)
Saif
Saif May 25 '13
Thanks for the answer Dave :) I am going to apply this after 1.6.

I reported earlier issu about duplicate meta tag but there wasn`t any useful answer http://www.oxwall.org/forum/topic/9710?page=1#post-48791
Dave .. will you please help for duplicate meta tags too.

dave Leader
dave May 25 '13
Yes Saif i will update your other post.. :)
dave Leader
dave May 25 '13
Saif got it, the keyword random code is posted on your thread.   I am also working on a description random as well.
Alia Team
Alia May 27 '13
Topic was moved from General Questions.
Daisy Team
Daisy May 30 '13
Guys, I am happy to inform you that we will fix the problem with the duplicate meta tags  in 1.6 version.
dave Leader
dave May 30 '13
Yayyyyyyyy  Daisy... are we going to be able to set those values in admin or in config ?
Daisy Team
Daisy Jun 5 '13
Yes, you will be able to modify the meta info values via Language section.
John Bedford
John Bedford Jul 9 '13
Hi Dave I am new to this. tried as you said earlier for keywords on another post. I have now tried what you suggested for titles. Can you put me write please?

$language = OW::getLanguage();         if ( $document->getTitle() === null )        {          //added to make tab titles random         /*          *******************************************************          *   you can change these array element names to what you want but dont use feature names like          *  chat or pictures or anything feature wise because you dont want to the tab          *  to show sitename - chatroom when they are in the dashboard.          *  so that is why i used generic name that describe the site instead.          ********************************************************          */                 $mytitarr = array("social network","community gathering","people mingle","dating","social bulgaria","meet others in bulgaria","hang out","online social","online dating","about bulgaria","members sales");           // put your site name here           // (sorry i could not find a sitename var that would work here for dynamic value)         $mysitname = "mysite.com | ";  // no www and keep the space - space at the end
          $myrandom_title = $mysitname.array_rand(array_flip($mytitarr),1);          $document->setTitle($myrandom_title);                //original code commented out               // $document->setTitle($language->text('nav', 'page_default_title'));                       }//close if gettitle null

dave Leader
dave Jul 9 '13

where it says mysite.com put you domain.com name no www no http

 

$language = OW::getLanguage();

 if ( $document->getTitle() === null )
  {
  //added to make tab titles random        
   $mytitarr = array
   ("social network","community gathering","people mingle","dating","social bulgaria","meet others in bulgaria","hang out","online social","online dating","about bulgaria","members sales");

   $mysitname = "mysite.com | ";   // no www and keep the space - space at the end
  
   $myrandom_title = $mysitname.array_rand(array_flip($mytitarr),1);
   $document->setTitle($myrandom_title);               
  
   //original code commented out
   // $document->setTitle($language->text('nav', 'page_default_title'));
  }//close if get title null

The Forum post is edited by dave Jul 9 '13
Pages: 1 2 »