×

Notice

The forum is in read only mode.
Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1

TOPIC: puarcade integration and duplicate content

puarcade integration and duplicate content 15 years 1 month ago #7350

  • cedric
  • cedric's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 8
  • Thank you received: 0
Hello,

I'm using !Joomlacomments with the puarcade component but The FID is missing.

FID: Puarcade is using a fid (folder id) in order to generate the URL.

So each game has now 2 URL (Duplicate)

can you have a look into this?

for example a good puarcade URL:

index.php?option=com_puarcade&fid=7&gid=8916&Itemid=19

the bad one generated by !joomlacomments:

index.php?option=com_puarcade&gid=8916&Itemid=19

can you do something about this? :dry:

thank's a lot

puarcade integration and duplicate content 15 years 1 month ago #7351

  • cedric
  • cedric's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 8
  • Thank you received: 0
In fact i think you must add the folderid parameter in the Query (josc_com_puarcade.class.php)in order to generate the good URL

Like:
$database->setQuery("SELECT title, description,folderid FROM jos_puarcade_games WHERE id='$contentid'");


and here:
$url = JURI::root(). "index.php?option=com_puarcade&fid=$something&gid=$contentId"

But i don't know how to do :S

puarcade integration and duplicate content 15 years 1 month ago #7352

  • Daniel Dimitrov
  • Daniel Dimitrov's Avatar
  • Away
  • Administrator
  • Administrator
  • Posts: 9618
  • Karma: 155
  • Thank you received: 1081
let me install puarcade again and I will tell you what is wrong :)

puarcade integration and duplicate content 15 years 1 month ago #7353

  • cedric
  • cedric's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 8
  • Thank you received: 0
Ok thank's a lot can't wait can't waiiiiiiiiiiiiit :woohoo:


All my gaming community is waiting for you :)

puarcade integration and duplicate content 15 years 1 month ago #7354

  • Daniel Dimitrov
  • Daniel Dimitrov's Avatar
  • Away
  • Administrator
  • Administrator
  • Posts: 9618
  • Karma: 155
  • Thank you received: 1081
you can either change the linkToContent function to this:
    function linkToContent($contentId, $commentId='') {
	$application = JFactory::getApplication();
	$menuid = $this->getItemid();
	if($commentId) {
	    $commentId = 'josc#' . $commentId;
	} else {
	    $commentId = '';
	}
	$fid = $this->getFid($contentId);
	$url = 'index.php?option=com_puarcade&fid=' . $fid . '&gid=' .$contentId
	    . ( $menuid ? "&Itemid=$menuid" : "" );
 
	if(JRequest::getVar('josctask') == 'rss') {
	    $url	= JURI::root() . $url;
	}
	if(!$application->isAdmin()) {
	    $url	= $url;
	} else {
	    $url	= JURI::root() . $url;
	}
	return JRoute::_($url);
    }
and also add this function
  function getFid($id) {
	$database = JFactory::getDBO();
 
	$query = 'SELECT folderid FROM jos_puarcade_games WHERE id='.$id;
	$database->setQuery($query);
	$result = $database->loadObject();
 
	return $result->folderid;
 
    }

or you can use the file attached com_puarcade-20091015.zip

puarcade integration and duplicate content 15 years 1 month ago #7355

  • cedric
  • cedric's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 8
  • Thank you received: 0
I try it just a moment please.... :unsure:

puarcade integration and duplicate content 15 years 1 month ago #7359

  • cedric
  • cedric's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 8
  • Thank you received: 0
Ok i've tried it.

- no more duplicate content anymore thank's :P

But... :silly:

- on the notification e-mail the URL is not correct because my domain name is missing... I've only this: /jouer/jeux-de-reflexion-et-puzzles/foghorn-thanks/

- Slashes are added in the email like here: (maybe a stripslashes missing somewhere) My site is in french with UTF-8

pas mal du tout c\\\'est elvis presley héhé

can you do something for this? :S

puarcade integration and duplicate content 15 years 1 month ago #7365

  • Daniel Dimitrov
  • Daniel Dimitrov's Avatar
  • Away
  • Administrator
  • Administrator
  • Posts: 9618
  • Karma: 155
  • Thank you received: 1081
Hey cedric,
This was difficult, but I think that I finally managed to make the links work in every situation. Replace the linkToContent function with this code and report back please :)
    function linkToContent($contentId, $commentId='') {
	$application = JFactory::getApplication();
	$menuid = $this->getItemid();
	if($commentId) {
	    $commentId = 'josc#' . $commentId;
	} else {
	    $commentId = '';
	}
	$fid = $this->getFid($contentId);
	$url = 'index.php?option=com_puarcade&fid=' . $fid . '&gid=' .$contentId
	    . ( $menuid ? "&Itemid=$menuid" : "" ) . $commentId;
 
	if(!$application->isAdmin()) {
	    $url	= JRoute::_($url);
	} else {
	    $url	= JRoute::_(JURI::root() . $url);
	}
 
/* for notification email links and not root directory - ! */
	if (substr(ltrim($url),0,7)!='http://') {
	    $uri   =& JURI::getInstance();
	    $base  = $uri->toString( array('scheme', 'host', 'port'));
	    $url = $base.$url;
	}
	return $url;
    }

puarcade integration and duplicate content 15 years 1 month ago #7367

  • cedric
  • cedric's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 8
  • Thank you received: 0
There is no glory if it's too easy :P

It just work fine! Great job! Thank's again!





And for the slashes added before the apostrophe? :blush: :blush: :blush: :blush: :blush: :whistle:
  • Page:
  • 1
Time to create page: 0.164 seconds