Menu Content

Support

> Forums, FAQs & Paid Support
Welcome, Guest
Username Password: Remember me

Move com_content Google News ID
(1 viewing) (1) Guest
Support forum for users using free edition of JoomSEF 3 (Joomla 1.5 compatible). These forums are mainly for mutual help between users.

Please note that due to our capacity limitations, we do not monitor these forums regularly.
  • Page:
  • 1
  • 2

TOPIC: Move com_content Google News ID

Move com_content Google News ID 14 years, 6 months ago #12302

  • P4rD0nM3
Hello I was wondering what line should I be looking for in the com_content.php to move the Google News ID.

Right now it's like...

www.website.com/category/GOOGLENEWSID-title/

I want it to be...

www.website.com/GOOGLENEWSID/category/title/

Thanks.

Re:Move com_content Google News ID 14 years, 5 months ago #12798

  • P4rD0nM3
Bump.

Re:Move com_content Google News ID 14 years, 5 months ago #12799

  • dajo
  • OFFLINE
  • Posts: 5069
Hello,

The GoogleNews() function is responsible for this, it would need to be changed, and also the lines that call it.

Best regards,
ARTIO Support Team
ARTIO Support Team

Re:Move com_content Google News ID 14 years, 5 months ago #12800

  • P4rD0nM3
Can you tell me which lines? I'm right there right now. Thanks!

Re:Move com_content Google News ID 14 years, 5 months ago #12806

  • dajo
  • OFFLINE
  • Posts: 5069
You can find the lines by searching for "googlenews" in the file. However, this won't be an easy few lines change, so I can't tell you, what exactly and where to change. Of course, you can buy our support time and we can make custom modifications for you: www.artio.net/e-shop/support-services

Best regards,
ARTIO Support Team
ARTIO Support Team

Re:Move com_content Google News ID 14 years, 5 months ago #12811

  • P4rD0nM3
Well here's the whole function.

    function GoogleNews($title, $id)
{
$db =& JFactory::getDBO();
 
$num = '';
$add = $this->params->get('googlenewsnum', '0');
 
if ($add == '1' || $add == '3') {
// Article ID
$digits = trim($this->params->get('digits', '3'));
if (!is_numeric($digits)) {
$digits = '3';
}
 
$num1 = sprintf('%0'.$digits.'d', $id);
}
if ($add == '2' || $add == '3') {
// Publish date
$query = "SELECT `publish_up` FROM `#__content` WHERE `id` = '$id'";
$db->setQuery($query);
$time = $db->loadResult();
 
$time = strtotime($time);
 
$date = $this->params->get('dateformat', 'ddmm');
 
$search = array('dd', 'd', 'mm', 'm', 'yyyy', 'yy');
$replace = array(date('d', $time),
date('j', $time),
date('m', $time),
date('n', $time),
date('Y', $time),
date('y', $time) );
$num2 = str_replace($search, $replace, $date);
}
 
if ($add == '1') {
$num = $num1;
}
else if ($add == '2') {
$num = $num2;
}
else if ($add == '3') {
$sep = $this->params->get('iddatesep', '');
if ($this->params->get('iddateorder', '0') == '0') {
$num = $num2.$sep.$num1;
}
else {
$num = $num1.$sep.$num2;
}
}
 
if (!empty($num)) {
$onlyNum = ($this->params->get('title_alias', 'global') == 'googlenews');
 
if ($onlyNum) {
return $num;
}
 
$sefConfig =& SEFConfig::getConfig();
$sep = $sefConfig->replacement;
 
$where = $this->params->get('numberpos', '1');
 
if( $where == '1' ) {
$title = $title.$sep.$num;
} else {
$title = $num.$sep.$title;
}
}


Do I just play with this one?
  • Page:
  • 1
  • 2
User Login Empty