Title: Question on code&#8230;?
Last modified: August 21, 2016

---

# Question on code…?

 *  [Taffy-boy](https://wordpress.org/support/users/taffy-boy/)
 * (@taffy-boy)
 * [13 years, 1 month ago](https://wordpress.org/support/topic/question-on-code/)
 * Hello,
    Can you please advise if the code shown below is responsible for the 
   URL that is used in the Title of the post being submitted..? If not then could
   you please direct me to the relevant code.
 * Thanks
 *     ```
       //## Format Message
       if (!function_exists("nsFormatMessage")) { function nsFormatMessage($msg, $postID, $addURLParams=''){ global $ShownAds, $plgn_NS_SNAutoPoster, $nxs_urlLen; $post = get_post($postID); $options = $plgn_NS_SNAutoPoster->nxs_options;
         // if ($addURLParams=='' && $options['addURLParams']!='') $addURLParams = $options['addURLParams'];
         $msg = stripcslashes($msg); if (isset($ShownAds)) $ShownAdsL = $ShownAds; // $msg = htmlspecialchars(stripcslashes($msg));
         $msg = nxs_doSpin($msg);
         if (preg_match('%URL%', $msg)) { $url = get_permalink($postID); if($addURLParams!='') $url .= (strpos($url,'?')!==false?'&':'?').$addURLParams;  $nxs_urlLen = nxs_strLen($url); $msg = str_ireplace("%URL%", $url, $msg);}
   
         if (preg_match('%SURL%', $msg)) { $url = get_permalink($postID); if($addURLParams!='') $url .= (strpos($url,'?')!==false?'&':'?').$addURLParams; 
   
           $url = nxs_mkShortURL($url, $postID); $nxs_urlLen = nxs_strLen($url); $msg = str_ireplace("%SURL%", $url, $msg);
         }
       ```
   
 * [http://wordpress.org/extend/plugins/social-networks-auto-poster-facebook-twitter-g/](http://wordpress.org/extend/plugins/social-networks-auto-poster-facebook-twitter-g/)

Viewing 2 replies - 1 through 2 (of 2 total)

 *  Plugin Author [NextScripts](https://wordpress.org/support/users/nextscripts/)
 * (@nextscripts)
 * [13 years ago](https://wordpress.org/support/topic/question-on-code/#post-3749344)
 * It depends. This code is used for %URL% tag. If your title is formed from %URL%
   tag then yes, otherwise no
 *  Thread Starter [Taffy-boy](https://wordpress.org/support/users/taffy-boy/)
 * (@taffy-boy)
 * [13 years ago](https://wordpress.org/support/topic/question-on-code/#post-3749357)
 * Hi,
    thanks for the response. Having checked the few networks I have set up, 
   all appear to use the default setting which I believe is %TITLE%.
 * So based on your response, the section of code I previously posted can be ignored!
 * So can you please tell me where the system is getting the url for the title when%
   TITLE% is used..? I know you previously stated that it takes the url from get_permalink,
   but what I am asking is where in the script …?
 * Thanks

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Question on code…?’ is closed to new replies.

 * ![](https://ps.w.org/social-networks-auto-poster-facebook-twitter-g/assets/icon-
   256x256.png?rev=1106267)
 * [NextScripts: Social Networks Auto-Poster](https://wordpress.org/plugins/social-networks-auto-poster-facebook-twitter-g/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/social-networks-auto-poster-facebook-twitter-g/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/social-networks-auto-poster-facebook-twitter-g/)
 * [Active Topics](https://wordpress.org/support/plugin/social-networks-auto-poster-facebook-twitter-g/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/social-networks-auto-poster-facebook-twitter-g/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/social-networks-auto-poster-facebook-twitter-g/reviews/)

## Tags

 * [links](https://wordpress.org/support/topic-tag/links/)
 * [php code](https://wordpress.org/support/topic-tag/php-code/)
 * [url](https://wordpress.org/support/topic-tag/url/)

 * 2 replies
 * 2 participants
 * Last reply from: [Taffy-boy](https://wordpress.org/support/users/taffy-boy/)
 * Last activity: [13 years ago](https://wordpress.org/support/topic/question-on-code/#post-3749357)
 * Status: not resolved