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 :)
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.
"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..
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.
$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
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