Problem with Viewer URLs in combination with AddThis.com service

2 posts by 2 authors in: Forums > CMS Builder
Last Post: October 12, 2010   (RSS)

Re: [linkandco] Problem with Viewer URLs in combination with AddThis.com service

By Jason - October 12, 2010

Hi Marcus,

What we need to do here is to check if the AddIt variables have been added to the string and if they have, temporarily remove them while we select our record.

Put this code right BEFORE your getRecords code:
$tempQueryString = $_SERVER['QUERY_STRING'];
if(count($_REQUEST)>1){
$temp= array_keys($_REQUEST);
$_SERVER['QUERY_STRING']=$temp[0];

}


If there is more than one variable in the query string, it will strip them out. Next, put this line right AFTER your getRecords code:
$_SERVER['QUERY_STRING'] = $tempQueryString;

This puts the query string back the way it was incase it needs to be used anywhere else on the page.

Hope this helps.
---------------------------------------------------
Jason Sauchuk - Project Manager
interactivetools.com

Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/