D-Mack Media Forums

Full Version: Where is the Recommend Module pulling site URL?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
In the en-GB.php file I see the variable %s as the placeholder for the site url. I'd like to know where this is pulling the site URL from because it is not correct. Whenever I try to replace the %s with an href syntax <a href="http://www.mysite.org"></a> I get an error with the PHP language file on that particular line. How can I override the %s variable within the following lines:

DEFINE("_DM_PREVIEW_SUBJECT","Your Friend <b><i>Users Username</i></b> wants you to check out <b><i> %s </i></b><br />");

DEFINE("_DM_PREVIEW_USER_INFO","<b><i>Users Username</i></b> (<b><i>Users Emailaddress</i></b>) thinks you would be quite interested in this great site - <b><i> %s </i></b>");

DEFINE("_DM_PREVIEW_LINK_INFO","Check out the site at: <b><i> %s </i></b>");
Hi Clue5377,

The component gets the information in the recommendfriends.php file. Near the top of the file, there are a few variables set - namely:

PHP Code:
$main_sitename $mainframe->getCfg('sitename');
$main_livesite JURI::base(); 


These are standard Joomla! functions and 'should' result in the correct settings.

The '$main_sitename' variable should return the name of your site that you entered in the Joomla! Admin - Global Configuration.

The '$main_livesite' variable should return the full URL of your website.

If for whatever reason you need to change them, you should do it in this file (not the en-GB.php file). The %s variable you mention use the 2 php variables I mention above.

Please let us know if that solves the problem.

Thanks,

D-Mack

D-Mack Wrote:
Hi Clue5377,

The component gets the information in the recommendfriends.php file. Near the top of the file, there are a few variables set - namely:

PHP Code:
$main_sitename $mainframe->getCfg('sitename');
$main_livesite JURI::base(); 


These are standard Joomla! functions and 'should' result in the correct settings.

The '$main_sitename' variable should return the name of your site that you entered in the Joomla! Admin - Global Configuration.

The '$main_livesite' variable should return the full URL of your website.

If for whatever reason you need to change them, you should do it in this file (not the en-GB.php file). The %s variable you mention use the 2 php variables I mention above.

Please let us know if that solves the problem.

Thanks,

D-Mack


Hi D-Mack,

Looking at this thread because I was wondering if RecommendSite is pulling from the current URL the user is at or simply pulling the base URL. Ie. If someone is within my site http://www.AtlantaDaily.com/daily_thoughts.html will Recommend send the URL AtlantaDaily.com or AtlantaDaily.com/daily_thoughts.html?

If not, this would be an feature to add and introduced within the admin, "Recommend Site or Page within Site". Within the recommendfriends.php won't the following work;

$main_sitename = $mainframe->getCfg('sitename');
$main_livesite = JURI::base();
$current_url = print(selfURL());
or
$current_url = getUrl($url);
or
$current_url = str_replace("www.", "", curPageURL());

Thoughts?

Thanks in advance!

Regards,
Chas

D-Mack Wrote:
Hi Clue5377,

The component gets the information in the recommendfriends.php file. Near the top of the file, there are a few variables set - namely:

PHP Code:
$main_sitename $mainframe->getCfg('sitename');
$main_livesite JURI::base(); 


These are standard Joomla! functions and 'should' result in the correct settings.

The '$main_sitename' variable should return the name of your site that you entered in the Joomla! Admin - Global Configuration.

The '$main_livesite' variable should return the full URL of your website.

If for whatever reason you need to change them, you should do it in this file (not the en-GB.php file). The %s variable you mention use the 2 php variables I mention above.

Please let us know if that solves the problem.

Thanks,

D-Mack



If I wanted to add a username as a reference in the URL, would I just append it to the end of the following line? :

PHP Code:
$main_livesite JURI::base(); 

Quote:
The component gets the information in the recommendfriends.php file. Near the top of the file, there are a few variables set - namely:
PHP Code:
$main_sitename = $mainframe->getCfg('sitename');
$main_livesite = JURI::base();


These are standard Joomla! functions and 'should' result in the correct settings.

The '$main_sitename' variable should return the name of your site that you entered in the Joomla! Admin - Global Configuration.

The '$main_livesite' variable should return the full URL of your website.

If for whatever reason you need to change them, you should do it in this file (not the en-GB.php file). The %s variable you mention use the 2 php variables I mention above.


If I want to change the clickable link from "www.examplewebsite.com" to "www.examplewebsite.com/file.html", please explain exactly what I need to do.

Thank you.

Philip.

Hi,

I just tried upgrading to 6.x-1.x-dev to see if it would fix the problem and it definitely does not.

Email displays "[link], [url], [path]" -- no actual URLs to be found...

I'm currently using Drupal 6.11. If I select the "Send email" (non-tokenized version) the URL is included in the email as it should be.

[EDIT]
For anyone who's looking for a workaround to link to a node URL, try this -- it worked for me:
[site-url]/node/[nid]
Reference URL's